Commit Graph

8396 Commits

Author SHA1 Message Date
Paul Duffin
2ced2eb07f Clean up apiLevelsGenerationFlags deps gathering
Restructures the code a little to make it clear that extensions
directories are distinct from dessert release directories.

Bug: 337836752
Test: m --no-skip-soong-tests nothing
Change-Id: I8ad68f0d112e62f8f1ddda1b6718119fe18eb8a9
2024-05-02 08:30:27 +01:00
Inseob Kim
e3208a03fc Merge "Install classpath protobuf files" into main am: 7cadaf6708 am: 2e87b97ef3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3066843

Change-Id: I4a0c088b678edf86875a21896a0ecc4467235d0a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-02 00:57:21 +00:00
Inseob Kim
7cadaf6708 Merge "Install classpath protobuf files" into main 2024-05-01 23:58:38 +00:00
Priyanka Advani
9b8e42e2f4 Merge "Revert "Make the enabled property configurable"" into aosp-main-future am: c4466a6387
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/27180893

Change-Id: I1d88f9b7033829eeabaaf11deca41c8b41acf0ba
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-01 23:21:48 +00:00
Priyanka Advani
ed5276f082 Revert "Make the enabled property configurable"
Revert submission 27162921-configurable_enabled_property

Reason for revert: Droid-monitor created revert due to Build breakage in b/338253720. Will be verifying through ABTD before submission.

Reverted changes: /q/submissionid:27162921-configurable_enabled_property

Change-Id: I2d144f9d297373a13a1190b173d10c966181ad84
2024-05-01 20:02:41 +00:00
Cole Faust
21d8e4068e Merge "Make the enabled property configurable" into aosp-main-future am: 1256e6f47a
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/27162921

Change-Id: Ia3e905622c7e9fcf95fbb8c76a8144cbf2324529
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-01 19:46:24 +00:00
Cole Faust
0e0d749062 Make the enabled property configurable
This allows using select statements with it.

Ignore-AOSP-First: This needs to be in a topic with changes in interal-only repositories, I'll cherrypick to aosp after.
Bug: 323382414
Test: m nothing --no-skip-soong-tests
Change-Id: I6f3efaaa3d82505e38a91ee4ba0e18e404360191
2024-04-30 10:56:12 -07:00
Inseob Kim
dd5324938c Install classpath protobuf files
This is to support etc/classpaths for filesystem modules.

Bug: 337993199
Test: m aosp_cf_system_x86_64
Change-Id: I0d5d3dc8af9646a24c8ae97d4d1418ddb0e5f46b
2024-04-30 17:22:58 +09:00
Paul Duffin
252255f593 Merge "Pass API surface specific extension jars to Metalava" into main am: 6f581637c1 am: da620a16b6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3061686

Change-Id: I4a72efea47b83c115f73a4c31364182890e8f64e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-29 20:03:08 +00:00
Paul Duffin
6f581637c1 Merge "Pass API surface specific extension jars to Metalava" into main 2024-04-29 19:19:16 +00:00
Inseob Kim
17ce834beb Export app's logtags too
Bug: 336189540
Test: m out/soong/.intermediates/all-event-log-tags.txt
Test: m out/target/common/obj/all-event-log-tags.txt
Change-Id: I3c1f09e57f17e2bea1c79841efc5f8c00c1b4a1c
2024-04-29 17:42:11 +09:00
Inseob Kim
37e0bb0db4 Merge logtags from cc modules too
Merged logtags files will be used for Soong built filesystem images.

Bug: 336189540
Test: m out/soong/.intermediates/all-event-log-tags.txt
Test: m out/target/common/obj/all-event-log-tags.txt
Change-Id: Ib590c2bc8073e9acee6b45ef08092768237cf9d3
2024-04-29 17:40:40 +09:00
Michael Wright
0b267bee67 Merge "V is 35." into main 2024-04-26 15:18:57 +00:00
Michael Wright
c91d0cdc0f V is 35.
It's not bromine, it's not a gauge of film: it's the next Android
release.

Ignore-AOSP-First: VanillaIceCream Finalization
Bug: 335304236
Test: presubmit
Change-Id: Ie4e17236c85944e828edaf01dcdc782984dc0ad4
2024-04-26 12:34:36 +00:00
Colin Cross
21ed4694c5 Allow overriding android_library_import manifests
Some of the androidx libraries have a transformed manifest
alongside that needs to be used to avoid introducing extra
androidx.startup provider entries.  Add a manifest property
that allows overriding the manifest provided by the aar file.

Bug: 336549758
Test: examine PermissionController.apk
Ignore-AOSP-First: submitting in topic with internal CL
Merged-In: I5c8daf810d2fde9a150cbfe48b4f4216f5d1ba0d
Change-Id: I5c8daf810d2fde9a150cbfe48b4f4216f5d1ba0d
2024-04-25 20:46:22 +00:00
Paul Duffin
58cfc9af9b Pass API surface specific extension jars to Metalava
Previously, it would only pass `public` extension jars. This change
fixes that so it passes the jars for the API surface being generated.

Bug: 336993217
Test: m out/target/common/obj/PACKAGING/api_versions_public_generated-api-versions.xml \
        out/target/common/obj/PACKAGING/api_versions_system_generated-api-versions.xml
      # Compare the following files to make sure that they include public extension
      # APIs and system extension APIs respectively.
      diff \
          out/soong/.intermediates/frameworks/base/api/api_versions_public/android_common/*/metalava_exportable.sbox.textproto \
          out/soong/.intermediates/frameworks/base/api/api_versions_system/android_common/*/metalava_exportable.sbox.textproto
Change-Id: I02e2ec3c8176cfbc3cbd8ac56fb78d12b765eedb
2024-04-25 19:04:32 +01:00
Kevin Liu
69049ac665 Merge "Added Strict_mode logic catch direct usage of Robolectric reference" into main am: 0c07d46585 am: 4814ca7068
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3047028

Change-Id: I9e4c5b1f9dbc1ffb52eb9dad4dd0e6de284ab90c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-24 22:33:08 +00:00
Kevin Liu
cab89b51c3 Added Strict_mode logic catch direct usage of Robolectric reference
When Strict_Mode is true, exclude Robolectric_all-target_upstream from the build pass, instead use the newly added robolectric_all-target_runtime, which compiles the robolectric lib into jar and later being added to final test jar.

Test: atest MyRoboTests
Bug: 334089788
Change-Id: I59291e3cc478e73f65950886853732ff0c5c5db7
2024-04-24 16:54:30 +00:00
Yu Liu
315a53c5cb Make container mandatory in aconfig_declarations.
Bug: 330354107
Test: Unit test and CI.

Ignore-AOSP-First: It is easier to detect all the missing ones in internal
master.
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:e916a2c758d2a95037d1d366e7cd0e10d241d510)
Merged-In: I4ab4271c67a35d0fdcc0b57c27260e29fb7dea56
Change-Id: I4ab4271c67a35d0fdcc0b57c27260e29fb7dea56
2024-04-24 16:41:57 +00:00
Yu Liu
51b0f1045b Merge "Make container mandatory in aconfig_declarations." into main 2024-04-23 23:54:40 +00:00
Yu Liu
e916a2c758 Make container mandatory in aconfig_declarations.
Bug: 330354107
Test: Unit test and CI.

Ignore-AOSP-First: It is easier to detect all the missing ones in internal
master.

Change-Id: I4ab4271c67a35d0fdcc0b57c27260e29fb7dea56
2024-04-23 21:54:54 +00:00
Treehugger Robot
bd5c92dfa9 Merge "Allow overriding android_library_import manifests" into main 2024-04-23 21:53:59 +00:00
Colin Cross
be77e450df Allow overriding android_library_import manifests
Some of the androidx libraries have a transformed manifest
alongside that needs to be used to avoid introducing extra
androidx.startup provider entries.  Add a manifest property
that allows overriding the manifest provided by the aar file.

Bug: 336549758
Test: examine PermissionController.apk
Ignore-AOSP-First: submitting in topic with internal CL
Change-Id: I5c8daf810d2fde9a150cbfe48b4f4216f5d1ba0d
2024-04-23 12:43:44 -07:00
Paul Duffin
8119148a45 Merge "Use new --api-lint-previous-api" into main am: a4362b937a am: 05903d700e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3051802

Change-Id: Ic3e36ba5768f18fe503b4a84ce713b6929a6e1cb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-23 13:39:07 +00:00
Paul Duffin
a4362b937a Merge "Use new --api-lint-previous-api" into main 2024-04-23 13:04:16 +00:00
Rico Wind
be9baeac1e Merge "Enable non final ids for non BusyBox builds" into main am: 8a2427cad2 am: 7de3822c96
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3047121

Change-Id: Id33c41e8e2142ad8785d943d963068ddf04a70ab
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-23 04:34:29 +00:00
Rico Wind
8a2427cad2 Merge "Enable non final ids for non BusyBox builds" into main 2024-04-23 04:03:24 +00:00
Treehugger Robot
8b94432165 Merge "PackageFile for permission/*.xml for sdk_library" into main am: b0a4e48c15 am: 0a8f7741fd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3053562

Change-Id: Ib9d5fb0fc90cf6a0dfcdd7ee121e7f1cc73b22d2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-22 23:29:15 +00:00
Treehugger Robot
c0dcd31b8b Merge "Include stubs type in metalava.rsp filename" into main am: affbd19c64 am: ee421a7c5f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3053403

Change-Id: If8adce05a59f0e473f424f855c0cc6315cacd35d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-22 23:29:03 +00:00
Treehugger Robot
b0a4e48c15 Merge "PackageFile for permission/*.xml for sdk_library" into main 2024-04-22 23:20:39 +00:00
Treehugger Robot
affbd19c64 Merge "Include stubs type in metalava.rsp filename" into main 2024-04-22 23:15:59 +00:00
Paul Duffin
0a71d7329d Use new --api-lint-previous-api
Bug: 327019023
Test: ./gradlew
Change-Id: Ief4d7380e7242dff4e82df96778af17d56c4fe82
2024-04-22 23:48:19 +01:00
Jihoon Kang
421c1cd796 Include stubs type in metalava.rsp filename
Currently, metalava.rsp filepath for both the everything and the
exportable stubs type are identical, which may lead to incremental build
issues. This change resolves such issue by including the stubs type in
the metalava.rsp filename.

These files cannot be modified as ".../everything/metalava.rsp" and
".../exportable/metalava.rsp" as `FlagWithRspFileInputList(...)`
enforces the rsp filepath to be outside of the outdir, which is
".../everything/" and ".../exportable/", respectively. Thus, this change
continues to generate the rsp file to be generated in the module outdir,
but modifies the name of the rsp files as "everything.metalava.rsp" and
"exportable.metalava.rsp".

This change also simplifies the parameters in metalavaCmd(...) for the
simplicity of the method parameters.

Test: m nothing and inspect output for the everything and the exportable stubs
Bug: 336360490
Change-Id: Ifd4e89ef69808e79ea720199677585f0217f7c1c
2024-04-22 21:29:05 +00:00
Jeongik Cha
00e0991f70 PackageFile for permission/*.xml for sdk_library
Bug: 333311683
Test: build android.bp system image and then check if there is
permission xml file for sdk_library

Change-Id: If5ac1975a7db10d85a1b11c1cd666051e3da546e
2024-04-23 05:49:44 +09:00
Colin Cross
19cdb7acf0 Merge "Convert apex mutator to a TransitionMutator" into main am: 757e88a9df am: c955bda138
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3042819

Change-Id: I6a986963f5e18b21668670fe600302d2d6af9447
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-22 19:25:22 +00:00
Colin Cross
757e88a9df Merge "Convert apex mutator to a TransitionMutator" into main 2024-04-22 18:32:22 +00:00
Rico Wind
7152e82a42 Enable non final ids for non BusyBox builds
Non final ids is a prerequisite for using optimized shrinking and
it will soon be a hard R8 error if you pass final ids in R classes
with optimized shrinking enabled.

Bug: 325905703
Test: SystemUIGo with optimized shrinking
Change-Id: I364edc5a0b22be7b4d737c2aa470a84704d05283
2024-04-22 11:24:36 +00:00
Sorin Basca
dd6e2e10af Merge "Add Java 21 as a known version" into main am: db70a80cc7 am: 0dbffbcee4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3048694

Change-Id: I618b6feaa7feae526e85cf8e0db516a51db576a0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-22 07:43:43 +00:00
Sorin Basca
db70a80cc7 Merge "Add Java 21 as a known version" into main 2024-04-22 07:08:02 +00:00
Treehugger Robot
18a42af5ef Merge "Support passing multiple last api files to metalava in droidstubs" into main am: 40639d7d7a am: ad4a90cd2b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2955008

Change-Id: Ie0b965487cded95dfac7cefcbb8757d4919f424b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-19 20:37:55 +00:00
Treehugger Robot
40639d7d7a Merge "Support passing multiple last api files to metalava in droidstubs" into main 2024-04-19 20:01:32 +00:00
Spandan Das
8364694ad6 Merge "Drop use_source_config_var from prebuilt selection" into main am: 2182c08f3e am: bf3c77cfc5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3048855

Change-Id: Ide20f4d36d90791ec7c137f51f03ab8b72ee80ed
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-19 19:35:14 +00:00
Jihoon Kang
5623e5425a Support passing multiple last api files to metalava in droidstubs
This change supports passing multiple last api files to metalava,
instead of emitting an error when multiple files are passed as inputs.

The last api file providing modules are filegroups or genrule modules
that output exactly one output file. This change modifies that behavior
so that the filegroups can output multiple api files.

The last api file providing modules are (mostly) generated from the
`prebuilt_apis` sdk module. However, these modules only provide a single
api scope txt files (e.g. system api scope last api file filegroup
would only provide last system api file, not system + public). This
change modifies `prebuilt_apis` by generating "combine" filegroup
modules, that include api files of the subset api scopes as well.

The ordering of the files are handled when generating the combined api
filegroup modules, and droidstubs module does not check whether the
passed api files are in order from the narrowest api scope to the widest
api scope.

Submission of this change will be done once metalava fully supports
handling multiple api files input for api lint and nullness migration.

Test: m nothing
Bug: 321827591
Change-Id: I2066e7ceb7ee7c6d0fd87cd43bfd08db906d4b8f
2024-04-19 10:56:32 +01:00
Sorin Basca
1fe2cc883f Add Java 21 as a known version
Bug: 335612268
Test: Set java_version to 21 in core-all && m
Change-Id: Ie2093187cec75949ae3bb4903edfb6f62aa31f6e
2024-04-19 10:45:55 +01:00
Spandan Das
7e674e69ef Drop use_source_config_var from prebuilt selection
This CL makes this property a no-op from the perspective of prebuilt
selection. The primary user of this was mainline modules, but they have
now switched to RELEASE_APEX_CONTRIBUTIONS_* for prebuilt selection,
both for internal `main` development and in partner drops.

Test: in internal, lunch cf_x86_64_phone-next-userdebug; m nothing; and
verified there was a path to the prebuilt bt apex

Test: in partner workspace, lunch gsi_partner_arm-ap31-userdebug; m
nothing; and verified that there was a path to the prebuilt adservices apex

Bug: 308188211
Change-Id: I124a6dada5c20aca4bdebf70dcbe5bbec28cefbe
2024-04-18 22:35:42 +00:00
Colin Cross
7c035064db Convert apex mutator to a TransitionMutator
Replace the apex mutator with a TransitionMutator.  Requires moving the
base.apexInfo value into a provider so that it is still present for the
Mutate pass.

Test: go test ./...
Test: no change to out/soong/build-${TARGET_PRODUCT}.ninja
Change-Id: I1c898eaf30b4021f0f96f439cc0b3b3173710fc7
2024-04-18 15:08:43 -07:00
Treehugger Robot
5ea835bd85 Merge "Allow dexpreopt of source sdklib in prebuilt apex builds" into main am: 17b9a5b8b4 am: 5f7e0106d7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3045742

Change-Id: Icfa72baf95d3c17830213afe70853bb15b44a6c5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-18 02:05:49 +00:00
Treehugger Robot
17b9a5b8b4 Merge "Allow dexpreopt of source sdklib in prebuilt apex builds" into main 2024-04-18 01:25:15 +00:00
Spandan Das
5ae65ee6e0 Allow dexpreopt of source sdklib in prebuilt apex builds
aosp/2984037 disabled dexperopt of the source apex system server jars
when prebuilts are selected. This was done to prevent duplicate
installation and dex2oat deps.

AOSP art has some additional variants like com.android.art.debug. In
source builds, this apex should contain service-art.jar and
service-art.jar.prof (a dexpeopt artifact). We have a test to check this
(`art_apex_test.py`). If we disable dexpreopt of source sdlib when
prebuilts are selected, this test needs to be disabled. This is the
behavior at ToT.

This CL changes the behavior to enable running this test even when
com.google.android.art prebuilt is active in a specific release
configuraiton. To prevent collisions that prompted aosp/2984037, this CL
special-cases the installation and dex2oat rules instead of disabling
dexpreopt of the source sdklib altogether.

b/331665856 tracks the principled solution to prevent duplicate
dexpreopt rules.

Implementation:
Add a new copyApexSystemServerJarDex arg to GenerateDexpreoptRule API.
If true, the dexjar file will be copied to
out/soong/system_server_jars/. For soong modules, the value of this will
be the inverse of disableSourceApexVariant. Since none of the apex
system server jars are in make, this will be a noop in dexpreopt_gen

Bug: 331665856
Test: modified trunk_staging.scl locally to select
art.google.contributions.prebuilt; mmma art; (with the sibling CL in
topic)

Change-Id: Idb59e424f83d126cdc8b1671dde358745979bd8d
2024-04-17 23:15:20 +00:00
Treehugger Robot
31448fc5f8 Merge "Remove extractEncodedDexJarsFromModules" into main am: 7bfe1377af am: 15feb2c9b3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3047153

Change-Id: Ic9e8de180d96ca454193a12f8d256d1e6dd41939
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-17 21:22:00 +00:00