Commit graph

6001 commits

Author SHA1 Message Date
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
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
Anton Hansson
51bbac2137 Remove apex framework jars from hard-coded list
All apex jars get auto-instrumented since
I2b1c0736202de26c5ea88c0ab14574bd7207a5fb

Test: $ EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true m nothing && \
      $ grep LOCAL_MODULE.*framework-sdkextensions.com.android.sdkext$ \
            out/soong/Android-aosp_coral.mk  -A9 -B2 | grep JACO
Change-Id: I1de5ba6673bef93b16c302412f920d93129d4420
2022-04-05 09:00:57 +00:00
Treehugger Robot
c7f2125a26 Merge "Keep dependency files out of the apk file." am: 5f58c378b6 am: d4a37e0757 am: f82be53525
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2055425

Change-Id: Ifdaf251cae92a6cb38f338e1455390fea84fc5df
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-05 06:50:38 +00:00
Treehugger Robot
5f58c378b6 Merge "Keep dependency files out of the apk file." 2022-04-05 05:53:22 +00:00
Bob Badour
2c8888edef Keep dependency files out of the apk file.
Bug: 227682036

Test: TARGET_BUILD_VARIANT=userdebug UNBUNDLED_BUILD_SDKS_FROM_SOURCE=true vendor/google/build/mainline_modules_bundles.sh -j97

Change-Id: I1a9775af7c652191bb1ce3b97c1cb9365b469c19
2022-04-04 19:21:18 -07:00
Colin Cross
c6ef485370 Use kapt stubs for kotlin header jar for javac
When compling kotlin code with annotation processors we are generating
java stubs for the kotlin sources using kapt, and parsing them in
turbine when running the annotation processors.  Passing --output
to turbine will also compile the stubs into a header jar that can
be used as a dependency to javac, allowing the javac and kotlinc
rules to run in parallel.  The turbine-apt header jar can't be used
as the header jar for downstream modules as it doesn't contain the
kotlin metadata needed by kotlinc rules, so the kotlinc gen-jvm-abi
plugin output is still used for the module's final header jar.

Test: TestKapt
Bug: 222095735
Change-Id: I82d0900f3dc30f3e3ebd7cab0693dfe741d9b955
2022-04-04 16:42:46 -07:00
Colin Cross
b5db401599 Enable turbine for api generating annotation processors when using kotlin
Normally turbine is disabled when an api generating annotation processor
is in use because the annotation processors are run in javac, so any
generated api would not be present in the turbine header jar.  When
compiling with kotlin and annotation processors, the annotation processors
(including any that generate api) are run in an extra turbine invocation
to generate sources to make the results visible to kotlinc, and so can
also be compiled by the normal turbine invocation.  Force turbine enabled
when kotlin sources are present.

Test: m SystemUI
Bug: 222095735
Change-Id: I5fcfe67e46cb4a4e90388f088327488959b6571f
2022-04-04 16:42:46 -07:00
Colin Cross
220a9a1245 Enable kotlin's jvm-abi-gen plugin to generate header jars
Kotlin's jvm-abi-gen plugin can generate header jars similar to the
turbine output for java sources, which can be used to avoid recompiling
downstream modules when the ABI hasn't changed.  Unlike turbine, the
plugin runs as part of the main kotlinc invocation, so it doesn't allow
the downstream modules to start compiling any sooner.

A future possible optimization is to use turbine to compile the kapt
stubs, at least for the  kotlin+annotation processor modules that already
generate them, which would allow compiling downstream modules before
invoking kotlinc or javac, as well as invoking kotlinc and javac in
parallel with each other.

Bug: 222095735
Test: TestKotlin
Test: m SystemUI
Change-Id: Ib1bb2ecea47c851a108a26f9ed4f827f289d1321
2022-04-04 16:42:46 -07:00
Colin Cross
e52c2ac7fb Enable restat for sbox rules
Add support to sbox for only writing output files if they are changed
to support enabling restat.  Move the clearing of the output directory
into sbox, and when write if changed is enabled delete obsolete output
files without deleting output files that will be replaced.

Enable restat for local metalava rules.  Restat for metalava rules
run remotely is still blocked on b/183630617.

Bug: 222095735
Test: TestRuleBuilder_Build
Test: m SystemUI
Change-Id: If8fc47e711f4a6f43947ab69f17cccc8ba6ae61a
2022-04-04 16:42:46 -07:00
Treehugger Robot
bb30ef3fd3 Merge "convert java_import jars with arch variants" am: 7a45d37e62 am: 0050ed2760 am: c70a811766
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1995732

Change-Id: I4a7caa5085dffcfad1b7413582ffcbfd0cd77220
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-04 17:02:11 +00:00
Treehugger Robot
7a45d37e62 Merge "convert java_import jars with arch variants" 2022-04-04 16:06:55 +00:00
Bob Badour
0a6539dd21 Merge "Revert "Revert "Build notice files from license metadata.""" am: 3aae38d451 am: b0489dec23 am: bf82573d27
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2051564

Change-Id: I0a1a9a0ea0ccd052dbc84cc6b2cce0b128393f63
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-02 01:48:21 +00:00
Bob Badour
3aae38d451 Merge "Revert "Revert "Build notice files from license metadata.""" 2022-04-02 00:43:34 +00:00
Ember Rose
09ba2cc0ab Merge "Rename InvalidNullabilityOverride suppression" am: 1d3b79f78f am: f4d7122237 am: 3739605cea
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2051891

Change-Id: Ie892f9594afc504be62a7a1c19bfda3541f99f49
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-01 18:55:06 +00:00
Bob Badour
de6a087d2d Revert "Revert "Build notice files from license metadata.""
This reverts commit 77807b3c27.

Reason for revert: fix and roll forward again

Change-Id: I80c796ca81ecf29df9522babe54d684a0d11b9e6
2022-04-01 18:00:00 +00:00
Ember Rose
1d3b79f78f Merge "Rename InvalidNullabilityOverride suppression" 2022-04-01 17:53:00 +00:00
Wei Sheng Shih
67c0b63929 Revert "Build notice files from license metadata." am: 77807b3c27 am: 72f9cdb599 am: 6c698e406d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2052565

Change-Id: I7e4f410833a4b8349e476d6fca4b2161c8f254f6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-01 17:26:29 +00:00