Commit Graph

903 Commits

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

Change-Id: I88d9dd8c3dabea01588455c92d8a734e93206e2d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-06 21:39:08 +00:00
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
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
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
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
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
Kiyoung Kim
0c6aad13cb Merge "Move LLNDK related logic to llndk_library" into main am: 3a7caee04b am: e8bfe963bd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3064822

Change-Id: Iae723b3f0781e3ad7d2bc5df38289fcafcd16788
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-02 01:23:44 +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
Kiyoung Kim
973cb6f555 Move LLNDK related logic to llndk_library
Currently VNDK contains some logic for LLNDK libraries as they are
treated in a similar way with VNDK. However, those logics should stay from
VNDK deprecation. To keep the logic, this change moves LLNDK related
logic into llndk_library.

Bug: 330100430
Test: Soong tests passed
Test: llndk.libraries.txt did not change from CF build
Change-Id: I1d02a3c2a398f1b1060b4f2bdd23af32310503bb
2024-04-30 13:05:19 +09:00
Ted Bauer
f08e6ff54c Merge "Switch to static deps" into main am: 8e4060abc5 am: 60462974fa
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3062942

Change-Id: Ie69b7b4b5d1ed79d1c327a3765dfa94815da7cb8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-26 15:47:44 +00:00
Ted Bauer
1e96f8c622 Switch to static deps
Bug: 328444881
Test: m
Change-Id: I53ad95ca281031ec98d5df66ada0ed69749da312
2024-04-26 13:46:09 +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
Ted Bauer
7a6d4f75d8 Merge "Add aconfig storage API deps to codegened lib" into main am: b39c877ae0 am: e7b8b02428
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3055467

Change-Id: I7e2663716723adf47224445f714a36147a82fe82
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-23 23:27:16 +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
Ted Bauer
f0f18591a5 Add aconfig storage API deps to codegened lib
Change-Id: I4991c9fccb0a0bab15457883cf20aacb3142c4cf
2024-04-23 18:25:26 +00:00
Treehugger Robot
60d2dec9fc Merge "java_sdk_library: Use WriteFileRule for writing permissions.xml" into main am: 1065ed8fbd am: 5b5557773c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3036694

Change-Id: Ia586005e57a8556a200492273814cc07ad958264
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-11 21:35:39 +00:00
Treehugger Robot
1065ed8fbd Merge "java_sdk_library: Use WriteFileRule for writing permissions.xml" into main 2024-04-11 20:55:30 +00:00
Jihoon Kang
f4b835ccd9 Merge "Collect aconfig_declarations of the dependent java_aconfig_library modules" into main am: 033ffb9533 am: 1628b82c6f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3001319

Change-Id: I81e9d102c17bb5a1caf4400fc9d9513eb2be5c02
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-11 18:03:02 +00:00
Jihoon Kang
033ffb9533 Merge "Collect aconfig_declarations of the dependent java_aconfig_library modules" into main 2024-04-11 17:37:58 +00:00
Paul Duffin
1816cde8ce java_sdk_library: Use WriteFileRule for writing permissions.xml
Use the `WriteFileRule` to write the permissions file for shared
libraries instead of generating a custom bash rule.

Test: TH
Change-Id: I904cf0742bfec46ed45ec7801bb9bd3dc3047185
2024-04-10 13:21:28 +01:00
Treehugger Robot
7b7070b1ff Merge "Deprecate Snapshot build" into main am: fe66e13714 am: 78c43929a8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3026703

Change-Id: Ia1413150acf7aea91e7655843986c2854316c251
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-05 05:28:46 +00:00
Treehugger Robot
fe66e13714 Merge "Deprecate Snapshot build" into main 2024-04-05 04:59:43 +00:00
Treehugger Robot
926580047b Merge "Return the header jar of the implementation library in SdkHeaderJars()" into main am: 133a6d9e6f am: f68bf7d95b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3026823

Change-Id: I9943c80d7c530fa86ab8d2e81dfd64cb7ce5fdfa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-05 04:13:51 +00:00
Kiyoung Kim
37693d0a27 Deprecate Snapshot build
Existing snapshot code will no longer work from VNDK deprecation, but it
can give confusion to users if we keep code for the snapshot - and it
adds complexity on existing code while it is not in use. This change
removes all snapshot definition except host snapshot and its usage.

Bug: 330100430
Bug: 332986564
Test: AOSP CF build succeeded
Change-Id: Ieb6fa43d5e38315c662ce997bc305b744b367c24
2024-04-05 01:56:56 +00:00
Jihoon Kang
8479dea802 Return the header jar of the implementation library in SdkHeaderJars()
As part of the process to remove the compilation action in the top level
java sdk library, this change modifies SdkHeaderJars(...) (i.e. the
"magic") to return the header jar of the implementation library instead
of the header jar of the top level java sdk library when the
implementation jar is returned from the "magic".

This change also removes `SdkImplementationJars()` from the
SdkLibraryDependency interface, as it is not currently used anywhere
else.

Test: m nothing --no-skip-soong-tests
Bug: 332785297
Change-Id: Icc00af4b1485dc2b1b0981a3e56758d0306dea69
2024-04-05 00:37:37 +00:00
Jesse Melhuish
50702c5fd7 Merge "Allow Multilib in override_apex" into main am: 219ce55481 am: 7dadc453d4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3019828

Change-Id: I66e587c770d55e951ba4b0de0edddd094e5fac3e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-01 14:55:34 +00:00
Ted Bauer
3edd314d67 Merge "Add logging dependencies to Rust aconfig APIs" into main am: 553bfd21d6 am: b468b6db7b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3020143

Change-Id: I40d55ea6adf14782c30aedff3d1584c4687380d1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-01 14:11:16 +00:00
Jesse Melhuish
219ce55481 Merge "Allow Multilib in override_apex" into main 2024-04-01 14:01:59 +00:00
Jesse Melhuish
ec60e25a1c Allow Multilib in override_apex
Test: m nothing --no-skip-soong-tests
Test: go test apex_text.go
Bug: 246854990
Change-Id: Id6e31c63acd87466a4436288d550ce6b298c677d
2024-03-29 21:13:57 +00:00
Ted Bauer
6ef40dbce6 Add logging dependencies to Rust aconfig APIs
Test: go test
Change-Id: I17c098f6b83c442554e49b6b802f11c97f94ec76
2024-03-29 14:05:05 +00:00
Kiyoung Kim
f628af167a Merge "Remove VNDK information from CC and APEX tests" into main am: 82488ca457 am: 865b2029ec
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3015994

Change-Id: I5d00669722163c7d90b8505af186cb7e470eb2be
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-29 05:15:29 +00:00
Kiyoung Kim
82488ca457 Merge "Remove VNDK information from CC and APEX tests" into main 2024-03-29 04:37:25 +00:00
Jihoon Kang
3921f0b356 Collect aconfig_declarations of the dependent java_aconfig_library modules
droidstubs module require aconfig_declarations modules to be specified
when the module depends on the java_aconfig_library module in order to
generate the "exportable" stubs. This adds burden to the droidstubs or
java_sdk_library module owners, as module should specify both the
java_aconfig_library and aconfig_declarations modules to genreate the
"exportable" stubs, although the necessary information from the
aconfig_declarations module can be provided from the
java_aconfig_library modules.

In order to resolve such burden, this change enables the intermediate
cache files from the associated aconfig_declarations module of a
java_aconfig_library module to be propagated to its reverse dependencies
without having the specify the aconfig_declarations modules in the
droidstubs or java_sdk_library modules definitions.

This does not mean that the intermediate cache files of every transitive
dependencies of the java_sdk_library or the droidstubs will be passed to
aconfig to retrieve the state of the aconfig flags.

Specifically, only the java_aconfig_library modules or the java_library
modules that have static dependency on java_aconfig_library modules that
are passed to droidstubs via `libs` or `srcs` (using
":module_name{.tag}" syntax) will provide the intermediate cache files
to generate the "exportable" stubs. For java_sdk_library, all modules
listed as `libs`, `static_libs`, `stub_only_libs`, and `apiScope.libs`
are passed as `libs` and all modules listed as `api_srcs` and `srcs` are
passed as `srcs` to the droidstubs modules dynamically generated in
java_sdk_library module per api scope, thus these properties will be
affected.

Note that the test is being added in the apex package. This is because
trying to register the codegen package build components in the java
package leads to circular dependency between the codegen and the java
package, as codegen package imports the java package.

Test: m nothing --no-skip-soong-tests
Bug: 329284345
Change-Id: I7953ab64776f6947808321ce8a3598154501bcfe
2024-03-29 01:11:32 +00:00
Ted Bauer
2b410c9e39 Merge "Add storage API as dependency to Rust codegen" into main am: 97045effe0 am: 292c596a54
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3018163

Change-Id: I34825bb1b1c89adb119eff789f94e0e5b7da222b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-29 00:18:20 +00:00
Ted Bauer
02d475c3d8 Add storage API as dependency to Rust codegen
Test: m
Bug: 328444881
Change-Id: Id1ef9276adb9f9b990a05b910937e96ab0a5ac50
2024-03-28 18:38:32 +00:00
Kiyoung Kim
0d1c1e6aef Remove VNDK information from CC and APEX tests
VNDK is deprecated in 24Q2, so soong should be tested with no device and
platform vndk versions. This change removes all VNDK related tests and
VNDK versions from soong-cc and soong-apex tests.

Bug: 330100430
Test: m nothing --no-skip-soong-tests passed
Change-Id: I45e6c13e6c0a6bc9710b120e8d5b167e2051631e
2024-03-28 15:15:01 +09:00
Treehugger Robot
6d08d4eea6 Merge "Add required, host_required, and target_required as dependencies" into main am: e58af3da5a am: 6116be9092
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3000612

Change-Id: Id534cb12d9786af0d99fd30f0389e02725309803
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-25 04:48:32 +00:00
Jiyong Park
8bcf3c64f1 Add required, host_required, and target_required as dependencies
So far, the installation of required modules were handled by Make. This
prevents us from implementing the module installation and packaging
entirely in Soong.

This CL is the first step towards that goal. Soong now correctly tracks
the dependencies and they are correctly returned by
TransitivePackagingSpecs(), which is used by packaging modules like
android_system_image.

Bug: 321626681
Test: build
Change-Id: I9192b5333ceaa0b7d1c5c4abeec2af62febcd976
2024-03-20 17:05:17 +09:00
Cole Faust
dd30c57d54 Don't use zip files when creating filesystems am: 3b806d3b88 am: a55678c6cf
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2999197

Change-Id: I3f52f4fa030e11f875b4a108c175fd844c305642
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-15 18:16:12 +00:00
Cole Faust
3b806d3b88 Don't use zip files when creating filesystems
The end result is a directory that's passed to build_image, so zipping
and then unzipping image contents will unnecessarily slow things down.

Bug: 329146343
Test: m microdroid --no-skip-soong-tests
Change-Id: I98223c60e8144d6c707832fcc03ba8fe94467e7b
2024-03-14 16:40:30 -07:00
Jooyung Han
0c1f5975ac Merge "Clean up LLNDK stubs" into main am: ed9005b556 am: 452797c6f7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2999576

Change-Id: Ica847f7a869dbd631e27b084415788547ad88ef1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-14 04:50:09 +00:00
Jooyung Han
5e8994e5ed Clean up LLNDK stubs
So far we created {"", "current"} stubs for LLNDK modules. But we don't
need "current" because "" itself is a stub.

This change only removes unused LLNDK stub modules with "current"
version, which aren't used at all.

Bug: 329183083
Test: m blueprint_tests
Change-Id: Ib8e880b6d88952b489657ea1ac557a48afe562a4
2024-03-12 16:26:18 +09:00
Spandan Das
2391caf42d Fix non-determinism in prebuilt selection am: f2c1057586 am: d1816e09f0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2984036

Change-Id: I6062c3ccd1e864bd2d5cd7790957db99b6a76f63
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-04 10:49:39 +00:00
Spandan Das
f2c1057586 Fix non-determinism in prebuilt selection
This relands aosp/2978137 with acknowledgement of soong namespaces.

If multiple versions of the prebuilt module sdk share the same soong
config namespace, then PrebuiltPostDepsMutator rewrites rdeps to one of
those prebuilts in a non-deterministic way.

This CL uses apex_contributions to make this deterministic. Multiple
prebuilts will not be allowed to have their prefer evaluate to true. If
this happens, one of the prebuilts must be explicitly declared in
apex_contributions.

This CL also fixes the special-casing of the top-level
java_sdk_library_import in ReplaceDirectDependencies. For
framework-foo.v2, it will use BaseModuleName framework-foo instead of
SdkLibraryName framework-foo.v2 to determine if the source module has
been selected.

Test: ran the previously failing cmd of b/327552112
Test: Added a unit test
Test: aninja -t query
    out/soong/.intermediates/packages/modules/Permission/SafetyCenter/Config/safety-center-config/android_common/javac/safety-center-config.jar
    | grep module_sdk is empty (should not cause a regression for
    323454855)
Change-Id: Id484a41192085c50b7e34ad415c6e195edb0d006
2024-03-04 07:59:34 +00:00