Commit graph

1109 commits

Author SHA1 Message Date
Colin Cross
53f0fd2cc3 Merge "Support target.hostdex.required" am: 226586ca3c
am: 02a9b1af2c

Change-Id: Id2ad67edd62f10446e7786241b0518091239ab42
2019-04-24 17:31:15 -07:00
Colin Cross
226586ca3c Merge "Support target.hostdex.required" 2019-04-25 00:06:00 +00:00
Colin Cross
bf88157691 Make java_test_helper_library installable am: 9a4abed701
am: 3109e125b3

Change-Id: I7d587db7e3cd8a4d23e653b7295d62d7a9cdb740
2019-04-24 15:55:03 -07:00
Colin Cross
4d002bafd2 Export proguard_dictionary for java_library modules am: e8a7dc987c
am: 5452d26838

Change-Id: I991eddb63cf66016bcfc3270ee876f0cdfe7cd99
2019-04-24 15:51:55 -07:00
Colin Cross
7f87f4fdeb Support target.hostdex.required
Hostdex modules sometimes need extra required modules, add
target.hostdex.required.

Bug: 131167818
Test: manual
Change-Id: I599f3499f0b738556baeb27185371a42b4c2701b
2019-04-24 20:43:14 +00:00
Colin Cross
9a4abed701 Make java_test_helper_library installable
java_test_helper_library should product an installabler, dexed
library, the same as java_test just without the auto-generated
test config.

Test: m checkbuild
Change-Id: Ie573c1d24969ba9c4feb8a2e85f8969d5d713064
2019-04-24 13:19:28 -07:00
Colin Cross
e8a7dc987c Export proguard_dictionary for java_library modules
Move exporting LOCAL_SOONG_PROGUARD_DICT from AndroidLibrary
to Library so that it is exported for java_library modules.

Test: m checkbuild
Change-Id: I27ea08ad8ba9072d0648c141cdbaf447c5268f91
2019-04-24 12:52:42 -07:00
Colin Cross
4192aa50e9 Export java_host_for_device and java_device_for_host modules to Make am: 28c3eb6829
am: 0872753d91

Change-Id: Ifffaa4dd1d2943deedfb2080d1bc3386c0080eaf
2019-04-24 10:35:17 -07:00
Colin Cross
28c3eb6829 Export java_host_for_device and java_device_for_host modules to Make
Robolectric needs to reference some modules declared with
java_host_for_device and java_device_for_host from Make for now.

Bug: 122331577
Test: m checkbuild
Change-Id: I09b3848edb120f2c3ee16b449b937b650f59811b
2019-04-24 05:17:22 +00:00
Jaewoong Jung
f80055138e Merge "New AndroidMk authoring system based on entry map." am: 159a585251
am: 7cf4b87560

Change-Id: I2b9e70d207146ba5a4d2c04489cc680b6f9d0d6f
2019-04-23 09:31:18 -07:00
Jaewoong Jung
159a585251 Merge "New AndroidMk authoring system based on entry map." 2019-04-23 14:43:52 +00:00
Jiyong Park
725cb5442d Merge "Set default target SDK version for APEX" am: 6fa6dfa25d
am: 83b88315f7

Change-Id: I3d6dcbaf1c7aa38ce6c7a1a57e35355edf94ff54
2019-04-22 17:36:55 -07:00
Treehugger Robot
6fa6dfa25d Merge "Set default target SDK version for APEX" 2019-04-23 00:18:54 +00:00
Jaewoong Jung
9aa3ab1f3f New AndroidMk authoring system based on entry map.
The new system collects all Android.mk variable assignments using a map
and writes them to io.Writer. Compared to the previous system, which
directly writes all entries to buffers, this new system is more robust
and test-friendly.

Test: Built without prebuilt_etc.go change and diffed the mk output.
Test: prebuilt_etc_test.go
Change-Id: Idd28443d129ff70053295015e69328a8fa3eca47
2019-04-22 15:32:44 -07:00
Colin Cross
6479beeca0 Merge "Allow codename.fingerprint format for targetSdkVersion" am: e928452f30
am: 1a385d14ef

Change-Id: Ib5d0bb3b6501a3b1565a13d21c57cf5e1a601a03
2019-04-22 10:09:41 -07:00
Colin Cross
e928452f30 Merge "Allow codename.fingerprint format for targetSdkVersion" 2019-04-22 16:48:35 +00:00
Colin Cross
19b9e855c9 Merge "Build framework.aidl in Soong" am: 8bf9bd9f91
am: 2e2967423a

Change-Id: I177c278e520177929aeb76fc1ce6f05ebc576a20
2019-04-21 10:38:53 -07:00
Colin Cross
8bf9bd9f91 Merge "Build framework.aidl in Soong" 2019-04-21 17:20:16 +00:00
Sasha Smundak
a6cc184cfd Merge "Fix handling optimize.enabled from java_defaults" am: 36ab727c82
am: 2f65feddde

Change-Id: I9ba47791f33c2722140dcfa3ddfe2b649ee3d9bd
2019-04-19 23:39:00 -07:00
Treehugger Robot
36ab727c82 Merge "Fix handling optimize.enabled from java_defaults" 2019-04-20 06:17:14 +00:00
Jiyong Park
71b519d6ce Set default target SDK version for APEX
Target SDK version is used for targeting an APEX to a specific set of
platform builds. Usually, the targeting is unrestricted (in case the
APEX can run on all platforms), or based on platform SDK version (e.g.
28 for P). However, when the platform is under development and SDK is
not finalized, the targeting should be much more fine-grained; the
APEX should be targeted to a very specific build that supports the same
set of APIs that the APEX was built against.

To support that, target sdk version is automatically set by the build
system. When the platform is released or SDK is finalized, the target sdk
version set to the SDK version number. If not, it is set to
<version_code>.<fingerprint> (e.g., Q.123456).
Note that the target sdk version set by the build system is used only
when the target sdk version is not explicitly set in
AndroidManifest.xml.

Bug: 130541924
Test: UNBUNDLED_BUILD_SDKS_FROM_SOURCE=true \
UNBUNDLED_BUILD_TARGET_SDK_WITH_API_FINGERPRINT=true \
TARGET_BUILD_APPS=com.android.tzdata m
build.ninja has --target_sdk_version Q.$$(cat out/soong/api_fingerprint.txt)

Test: aapt dump badging out/dist/com.android.tzdata.apex | grep \
targetSdkVersion shows:
targetSdkVersion:'Q.6ee443d9ad5f0cca7a43cfa97b7fc62a'

Change-Id: I086230d787f01075c28fc3f0163550300fa00212
2019-04-19 14:45:41 +09:00
Colin Cross
109328714f Allow codename.fingerprint format for targetSdkVersion
Use codename.fingerprint format for targetSdkVersion if it is unset
in the manifest and UNBUNDLED_BUILD_TARGET_SDK_WITH_API_FINGERPRINT=true.

Test: manual
Bug: 130541924
Change-Id: I4e3b1274cc32038b00b292dc6d67559eb320e9e4
2019-04-18 16:05:37 -07:00
TreeHugger Robot
3db7eb6e8b Merge "Get default sdk_test.go values from config" into qt-dev-plus-aosp 2019-04-18 22:35:30 +00:00
Colin Cross
3047fa23da Build framework.aidl in Soong
Move the rules to build framework.aidl into Soong, and use it
when compiling aidl files with sdk_version: "current".

Also fixes incorrectly using the aidl includes exported by the
"framework" module when the proguardRaiseDep dependency was
added.

Bug: 130798034
Test: sdk_test.go
Change-Id: I126adf1d9e7b6acb528875ff62b974ba7ad9a337
2019-04-18 13:51:58 -07:00
Colin Cross
60405e50f8 Get default sdk_test.go values from config
This will help avoid merge conflicts between branches that have
additional default libraries.

Test: sdk_test.go
Change-Id: I98d5b8b2ea939df7ef57686f3bd913d6a21edc5d
Merged-In: I98d5b8b2ea939df7ef57686f3bd913d6a21edc5d
2019-04-18 12:35:16 -07:00
Colin Cross
901ea31b7c Get default sdk_test.go values from config
This will help avoid merge conflicts between branches that have
additional default libraries.

Test: sdk_test.go
Change-Id: I98d5b8b2ea939df7ef57686f3bd913d6a21edc5d
2019-04-18 12:34:10 -07:00
Sasha Smundak
2057f82161 Fix handling optimize.enabled from java_defaults
Some module types (`android_test`, etc.) set `optimize.enabled` by
default. If such module happens to have `defaults` attribute which
clears `optimize.enabled`, the latter value is ignored.

Fixes: 129858282
Test: unit tests in java_test.go,
`atest CtsExtendedMockingTestCases` succeeds with aog/936802
reverted (that is, with cts/test/mocking converted to Android.bp)

Change-Id: Ib8e3a0ab0bd489d70ed07f626082aeae31c45e7c
2019-04-17 17:59:09 -07:00
Colin Cross
a2181fdc2d Add support for prebuilt java_sdk_library modules am: 79c7c26d8a
am: c1afb65520

Change-Id: Ia26c7f53332a4821218476d6c796f7ab39928b87
2019-04-17 16:03:54 -07:00
Colin Cross
79c7c26d8a Add support for prebuilt java_sdk_library modules
Add java_sdk_library_import for use when a java_sdk_library may
be used by unbundled branches that do not have the project that
contains the original java_sdk_library module.

Bug: 130287656
Test: m checkbuild
Change-Id: I62df4bccc0da95ed6c8b31dab8f2c32cc3215e9e
2019-04-17 11:28:34 -07:00
Colin Cross
f449d2aedb Merge "Use LoadHook to create modules in java_sdk_library" am: 59d4a31063
am: 414d337702

Change-Id: Ide9449f45066883662d05946fbbd43b142ec208f
2019-04-17 01:46:32 -07:00
Colin Cross
f8b860a0fb Use LoadHook to create modules in java_sdk_library
Creating new modules in a mutator is dangerous, as other mutators
that need to see the new modules may already have run, in this case
the prebuilts mutator.  Move SdkLibraryMutator to a LoadHook instead.
Also moves registering the LoadHook mutator to testing.go so it is
registered for all tests.

Test: m checkbuild
Change-Id: I08bd76a0e6205d2ca27861058067a1562c339eed
2019-04-16 21:46:28 +00:00
Colin Cross
3b4319f2a9 Merge "Make makevars deterministic" am: a88fbdef78
am: 4315944c16

Change-Id: Ibca9e4b4a685ad0debde6972ec311c2f038071d5
2019-04-15 18:16:42 -07:00
Colin Cross
91268c668c Make makevars deterministic
Sort map keys before iterating over them to produce makevars.

Bug: 130411407
Test: m checkbuild
Change-Id: I4153977705da05a5c73e641f93d02f408209c897
2019-04-12 14:55:16 +00:00
Colin Cross
6db352f959 Zip boot image am: df8eebecaa
am: c832b1516d

Change-Id: I8319c546fe77d80a5090bad90adedaace4ad53d6
2019-04-11 16:18:45 -07:00
Colin Cross
df8eebecaa Zip boot image
Create a zip file containing the zipped boot image files.

Test: m out/soong/sailfish/dex_bootjars/boot.zip
Change-Id: I1b08c9aca962a5999585cbe9e665693ef4558524
2019-04-11 23:03:23 +00:00
Dan Willemsen
c5f8f6e93f Stop using build/target -> build/make/target symlink am: 412160e1c9
am: 8862c76a68

Change-Id: I0dacd807818a58934d436724401335f2c8366c37
2019-04-10 13:46:48 -07:00
Dan Willemsen
c701896777 Include proper deps for signapk am: c4bd8f8282
am: 671f226029

Change-Id: I616b0878e6fa49c29eb438eeed1b3928cd60ee4c
2019-04-10 13:45:53 -07:00
Dan Willemsen
412160e1c9 Stop using build/target -> build/make/target symlink
Instead, fully specify build/make/target/... everywhere

Test: treehugger
Change-Id: I07ba0e9b0604919a271afd5133070616e1f404fc
2019-04-09 21:36:26 -07:00
Dan Willemsen
c4bd8f8282 Include proper deps for signapk
Bug: 130111713
Test: run signapk remotely, action succeeds after this change
Change-Id: I1670a27341591e0762cdfb42bcf424f065837192
2019-04-09 21:26:14 -07:00
Dan Willemsen
868e299039 Merge changes I2bff8fb8,Ifa584479 am: cb4e0551a2
am: 787b999bc0

Change-Id: Idbc987afbaf1fcc183629431a745c9ae41bb215f
2019-04-09 18:26:03 -07:00
Dan Willemsen
aad19605c5 Add extra used dependencies
Found while executing the build actions remotely.

Bug: 130111713
Test: treehugger
Test: run actions remotely with given dependencies, they pass.
Change-Id: I2bff8fb8ccf50fde446d6bcef0f1dca9b2974b4b
2019-04-09 09:50:25 -07:00
Nicolas Geoffray
6deaa031ab Merge "Use the full dexpreopt boot classpath when preopting with other images." am: ce93e3c672
am: 9ca94c7872

Change-Id: Ia01a517be9cb42151a8e57e391a72ff482935219
2019-04-09 00:20:55 -07:00
Nicolas Geoffray
ce93e3c672 Merge "Use the full dexpreopt boot classpath when preopting with other images." 2019-04-09 06:04:43 +00:00
Vladimir Marko
d20a62f8e1 Check package restrictions for Java libs. am: 0975ee0de3
am: f81df9115f

Change-Id: I36ba3c8a96b0e566f79babf213e13737018bcb0c
2019-04-08 13:21:52 -07:00
Nicolas Geoffray
06758a7e13 Use the full dexpreopt boot classpath when preopting with other images.
Bug: 119800099
Test: m
Change-Id: Ia9b34aa92ebb1b4de96ea0f8f290d798be19b2cf
2019-04-08 17:20:27 +01:00
Vladimir Marko
0975ee0de3 Check package restrictions for Java libs.
Test: m checkbuild; inspect verbose log.
Test: Manual - compile with unmet restrictions.
Bug: 122937705
Change-Id: I9360ae8b6d9ce016b7827be5e8ffc6eb521809b7
2019-04-08 14:02:14 +01:00
Nicolas Geoffray
fc0cc43da6 Merge "Use the apex image when the device config asks for it." am: 56405f8071
am: b32c872116

Change-Id: Ic40b3c44bc9c9d85f532878475f14489d5743069
2019-04-05 09:46:59 -07:00
Sasha Smundak
8b48326fbd Merge "Implement host_required and target_required properties." am: b9045cf28c
am: 0e47e406de

Change-Id: I476551e94329a1703d9afddc6cb25e7311ac64ef
2019-04-05 08:34:46 -07:00
Nicolas Geoffray
56405f8071 Merge "Use the apex image when the device config asks for it." 2019-04-05 09:34:34 +00:00
Sasha Smundak
b6d230515e Implement host_required and target_required properties.
They are counterparts of LOCAL_HOST_REQUIRED_MODULES and
LOCAL_TARGET_REQUIRED_MODULES respectively.

Fixes: 128693436
Test: treehugger, convert cts/hostsidetests/devicepolicy/Android.bp
Change-Id: Id66ffca6edffe18993ac51e8930f1d0e78178249
2019-04-04 11:24:01 -07:00