Commit Graph

8474 Commits

Author SHA1 Message Date
Treehugger Robot
e5011d8f23 Merge "Remove compilation actions from java sdk library" into main am: f91daab1ab
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3035972

Change-Id: I2df9d4940eb12bb8d8cb46d05bfef05d2666ae8f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-06 21:24:03 +00:00
Treehugger Robot
f91daab1ab Merge "Remove compilation actions from java sdk library" into main 2024-05-06 21:06:54 +00:00
Jiyong Park
4bc5231f61 Collect transitve deps of jni libs only for bundled apps
We do this because otherwise we will be embedding platform libs in the
bundled apps bloating their size.

Bug: 330276359
Test: Build Galery2 and check if libc++.so is not included there.
Change-Id: Ie866b192e9816bcb71b7ca3d74331d14d85592a4
2024-05-05 10:49:22 +09:00
Spandan Das
13af441368 Align boot jar exclusion with apex_contributions
During trunk stable development, it is possible that a new boot jar is
added to the source apex, but not available in prebuilt apex yet.
Thefore we need to conditionally check the `contents` of the respective
bootclasspath_fragment modules. https://r.android.com/2822393 did this
using isActiveModule. This function relies on soong config namespaces to
"hide" the source bootclasspath_fragment module when
<module>.source_build is false.

Soong config namespaces for mainline source vs prebuilt selection is no
longer in use, so this CL replaces `isActiveModule`. The CL cleaves the
implementation
1. For source builds, the check will run in the context of the
   bootclasspath_fragment module. `disableSourceApexVariant` will be
used to skip the check if prebuilts are selected.
2. For prebuilt builds, the prebuilt bootclasspath_fragment module sets
   a provider, and the top-level apex will do the check.

(2) is necessary to handle the edge case of multiple versioned mainline
prebuilts and possible skew in apex boot jars across them. In case of
prebuilt builds, the unselected mainline prebuilts will have
HideFromMake called on them, so the check will only run on the apex that
is actually used during the build.

Bug: 328578801
Test: go test ./apex
Ignore-AOSP-First: required to fix merge conflict

Change-Id: I6eec603397eea926f3a481b79ca938245064d809
2024-05-04 00:12:07 +00:00
Jihoon Kang
d831af4267 Remove compilation actions from java sdk library
This change modifies the build actions of java_sdk_library module type
so that it does not perform any compilation actions (i.e. does not
create the top level java_sdk_library jar file). Instead, it delegates
the build actions the top level jar file was performing to the
dynamically created ".impl"-suffixed java library module. The build
actions that are delegated to the impl library module include hiddenapi
processing, dexing, and dexpreopt.

Test: m nothing --no-skip-soong-tests
Bug: 332785297
Change-Id: I7534f9eaacf6d9f72fbf8d540b1e26af84106c20
2024-05-03 20:51:11 +00:00
Treehugger Robot
1792fd5fd1 Merge "Pass module-lib and system-server extension jars for system-server" into main am: 7a4d748669 am: 39435fdcd7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3072144

Change-Id: I702502c8daa496a2283472479f19c0572ae0fccc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-03 18:16:33 +00:00
Treehugger Robot
39435fdcd7 Merge "Pass module-lib and system-server extension jars for system-server" into main am: 7a4d748669
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3072144

Change-Id: I596139c5cdd1e118dc99c4bfc9b40ca0feb97a0d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-03 17:58:30 +00:00
Treehugger Robot
7a4d748669 Merge "Pass module-lib and system-server extension jars for system-server" into main 2024-05-03 17:54:07 +00:00
Jiyong Park
3eea67d8eb Always embed jni libs and store uncompressed
Previously, unlike unbundled apps, if a platform app depends on a native
library, it is not embedded in the app, but installed to <partition>/lib
and the app is instead provided with a symlink to the lib. This actualy
is a legacy from the original Android where native libraries couldn't be
executed while embedded in the apk. To be executed, the native libs had
to be extracted to a mutable storage, but that had a risk of breaking
the verified boot, so libs couldn't be embedded.

Since API level 23, execute-in-place of native libs has become
possible. But platform apps had to opt-in (use_embedded_native_libs:
true) for the feature for a reason that is unclear today. Perhaps, it
was to save disk space in case when multiple apps share the same native
library, but such cases are found to be very rare, or non-existing.

With this CL, two changes are introduced:

1. jni libs are always embededd for all apps (bundled or unbundled)

2. use_embedded_native_libs is deprecated unless the module type is
   android_test or android_test_helper_app. It is now a
   no-op property. It's left just to not break existing bp files.

This will make unbundled apps bigger, but given that unbundled apps
built using android platform build system are tests, the size increase
should be acceptible.

Bug: 330276359
Test: m
Change-Id: I7df993ea85bce1c0a7222000c403a974818c3362
2024-05-04 01:58:09 +09:00
Oriol Prieto Gascó
ff7d15ed9e Merge "Make container mandatory in aconfig_declarations." into main am: a874e94bab
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3058702

Change-Id: I6e9e2d8eb1f816a96e456d4d287b8821a2a606c4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-03 14:25:58 +00:00
Oriol Prieto Gascó
a874e94bab Merge "Make container mandatory in aconfig_declarations." into main 2024-05-03 14:09:48 +00:00
Inseob Kim
ea4c73febe Merge changes from topic "logtags_filesystem_module" into main am: 53507d1559 am: 4b45338a9d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3066502

Change-Id: I7131e61a01fc6e86f88f35cd19289cf4fd0b92d9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-03 12:09:35 +00:00
Inseob Kim
4b45338a9d Merge changes from topic "logtags_filesystem_module" into main am: 53507d1559
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3066502

Change-Id: I047402199b93062de23b5f4c3dfa9f4bec6fc018
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-03 11:39:06 +00:00
Paul Duffin
92efc6107f Pass module-lib and system-server extension jars for system-server
While the `system-server` API surface extends the `module-lib` API
surface a library can only provide one or the other as they appear
in bootclasspath and systemserverclasspath respectively. A library
that is on the bootclasspath cannot provide a `system-server` API
as it would be usable by non-system server code. A library that is
on the systemserverclasspath could provide a `module-lib` API but
there is no point as it would only be usable by the system server
making it effectively a `system-server` API anyway.

As a result the `system-server` extension directories only contain
`service-*` jars for libraries that provide system server APIs.

e.g.
```
$ ls prebuilts/sdk/extensions/11/system-server | cat
api
service-adservices.jar
service-sdksandbox.jar
$ ls prebuilts/sdk/extensions/11/module-lib/ | cat
api
framework-adservices.jar
framework-connectivity.jar
framework-connectivity-t.jar
framework-sdksandbox.jar
framework-tethering.jar
```

So, in order to construct the whole `system-server` API, i.e. the API
visible to the system server, it is necessary to add in the
`module-lib` extension jars too which this change does.

This is necessary to construct an `api-versions.xml` file for the
complete `system-server` API.

Bug: 336993217
Test: TARGETS=$(for i in public system module-lib module-lib-complete system-server-complete; do U=$(echo $i | sed "s|-|_|g"); echo "out/target/common/obj/PACKAGING/api_versions_${U}_generated-api-versions.xml"; done)
      m $TARGETS; mkdir -p before; cp $TARGETS before
      m $TARGETS; mkdir -p after; cp $TARGETS after
      meld before after
      # Review differences.
Change-Id: Ic9652dd28f05e5f569a7a30a84b87f227314d119
2024-05-03 12:21:56 +01:00
Inseob Kim
53507d1559 Merge changes from topic "logtags_filesystem_module" into main
* changes:
  Add logtags support to filesystem module
  Export app's logtags too
2024-05-03 11:20:12 +00:00
Paul Duffin
f2963c7f55 Correct lint error when it cannot find api_versions_* module am: 375acd8def am: 5175694880
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3071643

Change-Id: Ic7b62badd880f40112a27d03a153969de6f6234b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-03 10:16:08 +00:00
Paul Duffin
5175694880 Correct lint error when it cannot find api_versions_* module am: 375acd8def
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3071643

Change-Id: I5f13f890df3e692bcfba30ef4a43044a9929345d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-03 10:01:35 +00:00
Paul Duffin
375acd8def Correct lint error when it cannot find api_versions_* module
Also, fixes the error when it cannot find a module containing the
`annotations.zip` file.

Bug: 336993217
Test: change `apiVersionsModule` setting in `lint.go` to refer to
      a non-existent module and then run `m nothing` to see the
      error message correctly lists the module name.
Change-Id: I84a9e241d1c3bedebc26e119bd4b9861664c43c1
2024-05-03 09:37:42 +01:00
Inseob Kim
52827e13e4 Merge "Merge logtags from cc modules too" into main am: 364740b4a4 am: e33423dfc2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3064842

Change-Id: I0cb2c9ead316144372522a94654516614255cdfe
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-03 05:53:44 +00:00
Inseob Kim
e33423dfc2 Merge "Merge logtags from cc modules too" into main am: 364740b4a4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3064842

Change-Id: Ieddffdcc945c279ed06f9475db034854cf057702
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-03 05:31:46 +00:00
Inseob Kim
364740b4a4 Merge "Merge logtags from cc modules too" into main 2024-05-03 05:10:22 +00:00
Cole Faust
a963b94cde Make the enabled property configurable
This allows using select statements with it.

Bug: 323382414
Test: m nothing --no-skip-soong-tests
Change-Id: I6f3efaaa3d82505e38a91ee4ba0e18e404360191
Merged-In: If355d24506e3f117d27b21442a6c02bca3402dc7
2024-05-02 15:41:24 -07:00
Cole Faust
850469195e Merge "Reapply "Make the enabled property configurable"" into aosp-main-future am: 6c87a53771
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/27185858

Change-Id: I3d2aebc83b476195888476364ce9b15325e6d84c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-02 21:16:39 +00:00
Cole Faust
6c87a53771 Merge "Reapply "Make the enabled property configurable"" into aosp-main-future 2024-05-02 20:57:30 +00:00
Treehugger Robot
329847e1c7 Merge changes I439179a9,I8ad68f0d into main am: a73c4021ec am: 832dfa8b76
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3069684

Change-Id: I22ebf3750938882c5fb3a08dd54a9003bff0e6d9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-02 18:50:07 +00:00
Treehugger Robot
a73c4021ec Merge changes I439179a9,I8ad68f0d into main
* changes:
  Add pattern to match android-plus-updatable.jar
  Clean up apiLevelsGenerationFlags deps gathering
2024-05-02 18:17:08 +00:00
Cole Faust
021bf3d973 Reapply "Make the enabled property configurable"
Previously, I had changed some loadhook-appended property structs
to use selects instead of the "target" property struct. This seems
to not be exactly equivalent because "target" properties are merged
with the regular properties later, at the time the arch mutator runs.

With this reapplication, leave those target property structs alone
to avoid breakages, but I'll have to look into what the issue is
with them later.

This reverts commit ed5276f082.

Ignore-AOSP-First: This cl needs to be in a topic with internal-only projects, will cherrypick to aosp after.
Bug: 323382414
Test: m nothing --no-skip-soong-tests
Change-Id: If355d24506e3f117d27b21442a6c02bca3402dc7
2024-05-02 10:56:36 -07:00
Paul Duffin
5a195f40a0 Add pattern to match android-plus-updatable.jar
Change https://r.android.com/3068903 adds some extra
`android-plus-updatable.jar` files in `module-lib` and `system-server`
directories of API versions 30 through 34 in `prebuilts/sdk`. This
change modifies the build to pass those files, along with appropriate
`--android-jar-pattern` options to Metalava so it can use them when
generating `api-versions.xml` files for the different API surfaces.

The extra patterns are only passed when `extension_info_file` is
specified as there is no point in including the updatable modules that
contribute to SDK extensions without providing information about the
SDK extensions as well.

Bug: 337836752
Test: See https://r.android.com/3068903
Change-Id: I439179a9d35a4bb677e3bf87a3aea4a983724534
2024-05-02 17:33:02 +01:00
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