Commit graph

6017 commits

Author SHA1 Message Date
Treehugger Robot
d5696881ec Merge "Limit JIT tier for D8" am: 00be8b8bda am: 62737cf4f7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2070112

Change-Id: Id84b9462597e68db95a26913d36e0b78212a877a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-22 07:49:49 +00:00
Jared Duke
0cf7c9686d Limit JIT tier for D8
Standalone D8 invocations tend to be shorter-lived than R8 invocations
that involve deeper layers of bytecode optimization. Introduce a
separate set of JVM flags to pass to D8 invocations which limit the
runtime JIT tiering, reducing overall compile times and significantly
reducing total CPU consumption for D8 build workloads.

Representative incremental build times with this change:
 * real 6m1.388s
 * user 63m32.412s
and without:
 * real 6m30.624s
 * user 79m12.626s

Bug: 205303544
Test: time m
Change-Id: Ic568a4316325c6a4e0da41ffebbb07f0c5f7e8e3
2022-04-21 18:24:52 +00:00
Vinh Tran
c4add3f86c Merge "Update doc for Platform_apis field in DeviceProperties" am: ef4a5a3028 am: 58d8a1e993 am: c9d25bd9d8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2065673

Change-Id: I1fe398cc641588e89271fa3547ccc6cf9da33455
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-19 01:36:41 +00:00
Vinh Tran
ef4a5a3028 Merge "Update doc for Platform_apis field in DeviceProperties" 2022-04-19 00:14:16 +00:00
Vinh Tran
d91939ee84 Update doc for Platform_apis field in DeviceProperties
The doc for Platform_apis is outdated. The property is used by not only android_app, but also android_test and android_test_helper_app

https://cs.android.com/android/platform/superproject/+/master:build/soong/java/app.go;l=382;bpv=1

Next steps:
1. Clean up existing misuse of Platform_apis and Sdk_version in android_test and android_test_helper_app.

2. Add validation check to ensure proper use of Platform_apis and Sdk_version moving forward android_test and android_test_helper_app.
Currently, android_app already has validation in place. https://cs.android.com/android/platform/superproject/+/master:build/soong/java/app.go;l=275;bpv=1;bpt=1
WIP: https://android-review.googlesource.com/c/platform/build/soong/+/2065270

Test: N/A
Change-Id: I934860cdc8b23268d70e205089118c6451d4cf8a
2022-04-18 19:51:34 +00:00
Yike Zhang
2b18574ee0 Merge "Export Java library dependency information" am: 29f5068a1c am: 51d0f34e93 am: c3763358db
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2063668

Change-Id: I043e0aac97d79520bd1f4f2140fda5f774e7a206
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-18 06:04:36 +00:00
Yike Zhang
29f5068a1c Merge "Export Java library dependency information" 2022-04-18 04:58:47 +00:00
Yike
f628202aab Export Java library dependency information
Write `static_libs` and `libs` of Java library and Android app modules to module_bp_java_deps.json. This enables downstream tools to correctly set up the runtime environment. Note that while static libraries don't need to be on the Java classpath these modules could have non-static library dependencies that do need to be present.

Test: m out/soong/module_bp_java_deps.json
Bug: 227538646
Change-Id: I7c4aecb2fb03c890f0d2aaae80e619f6176809ef
2022-04-18 10:23:28 +08:00
Vinh Tran
b8aab29909 Merge "Update doc for DeviceProperties's Sdk_version field" am: 62a2fd93de am: cfbb243ff2 am: 3830ae1ecd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2065271

Change-Id: I4c6e1267c6e89be8ba65babbd04467a847b758b8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-15 00:53:03 +00:00
Vinh Tran
62a2fd93de Merge "Update doc for DeviceProperties's Sdk_version field" 2022-04-14 23:42:51 +00:00
Vinh Tran
1fa6b944bb Merge "Document AARImportProperties fields" am: 08e0f96841 am: a5580107d0 am: 564bdea9ad
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2063168

Change-Id: I5a324f4aaf8c3d074caf58fd5f8b84ac4a0f5a99
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-14 21:38:05 +00:00
Vinh Tran
a9c8f7db27 Update doc for DeviceProperties's Sdk_version field
Test: N/A
Change-Id: I7848ce27a5dcecaf24b0129908f6673dd1fdb63f
2022-04-14 21:02:16 +00:00
Vinh Tran
08e0f96841 Merge "Document AARImportProperties fields" 2022-04-14 20:25:11 +00:00
Vinh Tran
d067eae547 Merge "Fix documentation for android_app_import" am: fc5b47e5d4 am: 6d7f6c7442 am: 10af7350c9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2062873

Change-Id: I2bd39f9eef125a33ecf9d7128ae3da777d9f864b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-14 18:14:22 +00:00
Vinh Tran
4ae8d4ac46 Fix documentation for android_app_import
Test: N/A
Fix: 226586426
Change-Id: I588a249a85d152f37f5d1bd7157cfab120185648
2022-04-13 21:40:23 +00:00
Jeff Sharkey
50493f0797 Hacky workaround for half-finalized builds.
Metalava increments the SDK level by one when it's not "REL", so we
temporarily force the build to be "REL" while we're still in the
process of finalizing it.

This CL must be reverted as part of actually declaring "REL".

Bug: 171506470
Test: Build
(cherry picked from commit 05597c0cc4)

Change-Id: I18405cdd27769598f5e7a6a968f0dd473f936f6c
2022-04-13 12:36:52 +00:00
Vinh Tran
ce0781f8f5 Document AARImportProperties fields
Test: no testing necessary

Change-Id: Idff223f5c9a0b89cd5e0e2c8782c700d8fe9e9b3
2022-04-13 02:12:37 +00:00
Treehugger Robot
9bad6061fb Merge "Remove implementation details from stub flags in sdk snapshot" am: 03f951d026 am: bd5971349d am: 54bbc2a41e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2056470

Change-Id: Id015abe20918c741d01e6df7889ca7dc9e82f5f7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-12 21:50:18 +00:00
Paul Duffin
bd88c882f6 Remove implementation details from stub flags in sdk snapshot
Previously, the build applied the same filtering to remove
implementation details from the sdk snapshot's stub-flags.csv file as
it did for its all-flags.csv, i.e. removing the signatures that only
had a "blocked" flag. Unfortunately, that had no effect on the stub
flags as the implementation signatures had no flags, not a single
blocked flag. That meant that the sdk snapshot's
filtered-stub-flags.csv file contained a lot of implementation details.

This change removes signatures from stub-flags.csv that have no flags
which removes all implementation details from the sdk snapshot.

Bug: 194063708
Test: atest --host verify_overlaps_test
      m out/soong/hiddenapi/hiddenapi-flags.csv
      m art-module-sdk
      # Check contents of its filtered-stub-flags.csv file
Change-Id: I30edc77348fad118ea732e787ae8e206c8841f84
2022-04-12 17:44:15 +01:00
Colin Cross
6bfe9bc4fa Merge changes I046d75db,Ie13817dc am: d2aa190bdc am: f2c86c8c76 am: 1a3ea67458
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2058908

Change-Id: I9ab91976903abbb4e3ec17b3d26db15447f074d6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-12 00:58:51 +00:00
Colin Cross
412436f7fe Don't panic if no certificates found
Getting the first certificate will panic if there are no certificates,
which can happen when AllowMissingDependencies is set and the
certificate property is a module reference to a missing module.
Only get the first certificate if the list is not nil.

Bug: 228379411
Test: TestAppMissingCertificateAllowMissingDependencies
Change-Id: I046d75dbbd4f21f4a2b6851f558e430e9879fcff
2022-04-11 11:50:34 -07:00
Colin Cross
abc0dab477 Move proguard test files to java package
The proguard test files are duplicated in apex and sysprop and will
be needed by app tests, move them to the java package.

Test: run all soong tests
Change-Id: Ie13817dcda8d98801d16a97ffceef1100c7d5380
2022-04-11 11:44:32 -07:00
Treehugger Robot
0bd019264a Merge "convert logtags in java srcs" am: b6e1614272 am: af8e9c73e6 am: 311f9a2c99
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2042847

Change-Id: I579eb834bd7481c5d819d2f469e663018aad09a0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-08 23:49:41 +00:00
Treehugger Robot
b6e1614272 Merge "convert logtags in java srcs" 2022-04-08 22:37:22 +00:00
Treehugger Robot
759f5a25a6 Merge changes from topic "export-vars" am: a2a7b57924 am: 066a777c15 am: fefe3547a2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2044966

Change-Id: I3f71b23b335baa61b0b997e454d900a8e914c549
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-08 18:36:58 +00:00
Treehugger Robot
a2a7b57924 Merge changes from topic "export-vars"
* changes:
  export Java variables to Bazel
  refactor Bazel variable export
2022-04-08 17:31:23 +00:00
Sam Delmerico
24da73c032 convert logtags in java srcs
Some java_* modules contain .logtag files in their srcs, but we should
separate these out into their own targets.

Test: enabled QuickSearchBox and build
Change-Id: I595722ca59686d450ff522987a15ce283d3607e0
2022-04-08 14:43:18 +00:00
Paul Duffin
47d2f67b63 Merge "Use named options for verify_overlaps" am: 510a5e054d am: 0971c66db1 am: 965a6b6ace
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2056469

Change-Id: I4286758276a613ade977eba53192875d9b4b4fd9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-08 14:40:21 +00:00
Sam Delmerico
932c01cf9e export Java variables to Bazel
Test: build/bazel/bp2build.sh
Change-Id: Ia06f9265c9f96e6add6edbd0cee925fe37b430d3
2022-04-08 14:15:43 +00:00
Paul Duffin
0c12b78ae8 Use named options for verify_overlaps
Previously, verify_overlaps used positional arguments, the first was
the monolithi flags and the rest were the module flag pairs (filtered
flags file and signature patterns file). This change makes them use
named options to make the purpose of the arguments clearer on the
command line.

Bug: 194063708
Test: atest --host verify_overlaps_test
      m out/soong/hiddenapi/hiddenapi-flags.csv
Change-Id: Ife0af0016eb0f91416e8330d5d98cb53c97d68a4
2022-04-08 10:56:21 +01:00
Matt Banda
fd70f165f1 Merge "Surface Java APIs Used By APK-only Modules." into tm-dev 2022-04-07 00:04:38 +00:00
Isaac Chiou
b42b4bbabe Merge "Revert "Use kapt stubs for kotlin header jar for javac"" am: c7bb9d47d6 am: 7d2d0e6d77 am: ef91866a4f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2057288

Change-Id: Ic77576558d3734d45b3d2773def8f2ed2d0acc72
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-06 09:24:10 +00:00
Isaac Chiou
c7bb9d47d6 Merge "Revert "Use kapt stubs for kotlin header jar for javac"" 2022-04-06 08:25:29 +00:00
Isaac Chiou
a23d994022 Revert "Use kapt stubs for kotlin header jar for javac"
This reverts commit c6ef485370.

Reason for revert: Multiple systemui presubmits are broken due to this change

Bug: 228262695
Change-Id: I1efed519c49d8d0583815c7bf2b3801bf0ba12fa
2022-04-06 07:04:09 +00:00
Wei Li
296d499653 Merge "Export provenance metadata for prebuilt APKs and APEXes." am: c055d88c16 am: c41308e05e am: d58ecd96a8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2045371

Change-Id: Idd4f83b79dd05e7f299cd26110bdc1f22d7b2e49
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-06 05:32:38 +00:00
Wei Li
c055d88c16 Merge "Export provenance metadata for prebuilt APKs and APEXes." 2022-04-06 04:03:41 +00:00
Colin Cross
8e1ded0dc6 Merge "Use kapt stubs for kotlin header jar for javac" am: 40f8c75752 am: c139d442a8 am: da9b9971d5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2047063

Change-Id: I9e1a130c71f622af7f5960d1443b5aa178681777
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-06 00:36:41 +00:00
Colin Cross
896db3b54b Merge "Enable turbine for api generating annotation processors when using kotlin" am: bbf5f8c158 am: 7574476c78 am: 09d3d9fb49
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2046153

Change-Id: Ib9620eec2e6d1bb3661b9efc1cc708eaad061e38
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-06 00:36:33 +00:00
Colin Cross
0b88c69c7f Merge "Enable kotlin's jvm-abi-gen plugin to generate header jars" am: 93d65fb60d am: 5e281cd016 am: 47790e8bbb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2046152

Change-Id: I24eccda6e30bb605f21597c0f334893a0a3eaefb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-06 00:36:16 +00:00
Colin Cross
42e0005e7a Merge "Enable restat for sbox rules" am: 209844ce1c am: 55d2f88cc8 am: 299cadf6eb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2046151

Change-Id: I72aabaf85b3ba6ee34d8ac680804b8e1f8fc0e35
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-06 00:35:58 +00:00
Colin Cross
40f8c75752 Merge "Use kapt stubs for kotlin header jar for javac" 2022-04-05 23:59:34 +00:00
Colin Cross
bbf5f8c158 Merge "Enable turbine for api generating annotation processors when using kotlin" 2022-04-05 23:48:12 +00:00
Colin Cross
93d65fb60d Merge "Enable kotlin's jvm-abi-gen plugin to generate header jars" 2022-04-05 23:32:54 +00:00
Wei Li
340ee8e699 Export provenance metadata for prebuilt APKs and APEXes.
Bug: 217434690
Test: atest --host gen_provenance_metadata_test
Test: m provenance_metadata

Change-Id: I91c184b6e6fe5ccfc3fc65b55b09e7a3da9502a0
2022-04-05 16:16:16 -07:00
Colin Cross
209844ce1c Merge "Enable restat for sbox rules" 2022-04-05 22:49:10 +00:00
Matt Banda
8c80126987 Surface Java APIs Used By APK-only Modules.
Previously we were only generating used-by API-coverage for APEX modules.
This change adds support for APK-only modules such as NetworkStack and DocumentsUI.

Bug: b/216313756
Forrest Run: https://android-build.googleplex.com/builds/abtd/run/L10800000953846781

Test: TARGET_BUILD_VARIANT=userdebug PRODUCT=mainline_modules_x86 ./vendor/google/build/build_unbundled_coverage_mainline_module.sh -j16

Change-Id: Id17e4a55c2a52e9903632a654e778f8d54982dfc
Merged-In: Id17e4a55c2a52e9903632a654e778f8d54982dfc
(cherry picked from commit 56d75785bd)
2022-04-05 21:28:29 +00:00
Treehugger Robot
6d3c98c603 Merge "support errorprone javacflags" am: ef03b3d8ba am: 9f677ae8c7 am: 2c7155c74e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2029264

Change-Id: I3723bec4cf3b235e95d73459da5d92af4939873e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-05 20:43:58 +00:00
Treehugger Robot
ef03b3d8ba Merge "support errorprone javacflags" 2022-04-05 17:46:08 +00:00
Anton Hansson
40f8841bf8 Merge "Remove apex framework jars from hard-coded list" am: 71cf2a3cc6 am: 3969920129 am: 3cbb5e929d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2054405

Change-Id: I1e42f76aaf9790701362c0d103b8b3e7ba4e79fc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-05 12:20:26 +00:00
Anton Hansson
71cf2a3cc6 Merge "Remove apex framework jars from hard-coded list" 2022-04-05 11:46:04 +00:00