Commit Graph

8107 Commits

Author SHA1 Message Date
Jihoon Kang
f8a621c609 Merge "droidstubs depend on the combined last api filegroup modules" into main am: 5a87a9ac1c am: cc43b09384
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3005018

Change-Id: Ie460873f74f441745ade3ab5b005c43a09bc7c9a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-21 18:25:30 +00:00
Jihoon Kang
5a87a9ac1c Merge "droidstubs depend on the combined last api filegroup modules" into main 2024-03-21 17:34:00 +00:00
Rico Wind
62aeba6724 Merge "Add flag for optimized resource shrinking with R8" into main am: bd71657e91 am: d430eea043
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3000943

Change-Id: Ifcaff7d70d8b316e6f8d30b02fb289b76a56eb54
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-21 15:21:25 +00:00
Rico Wind
bd71657e91 Merge "Add flag for optimized resource shrinking with R8" into main 2024-03-21 14:45:13 +00:00
Rico Wind
a2fa263786 Add flag for optimized resource shrinking with R8
If the flag is set we will:
 - pass --optimized-resource-shrinking to the r8 invocation
 - use non final fields for the generated R classes
 - not pass the aapt2 generated proguard rules, R8 will do the tracing of xml files

Bug: 325905703
Test: This is simply passing the flag through to R8, this is off by default
Change-Id: Ib2043f3201578c3bcd39c1de9a524fd78f6d795c
2024-03-21 12:33:53 +01:00
Treehugger Robot
c42283844d Merge "Export JavaBootLibsSdkMemberType and JavaSystemserverLibsSdkMemberType" into main am: b291690bc4 am: f2a9631f03
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3005678

Change-Id: I6e1fa0e258bdcd76518f6c6c8f9e2836f2182bc4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-21 03:26:01 +00:00
Treehugger Robot
b291690bc4 Merge "Export JavaBootLibsSdkMemberType and JavaSystemserverLibsSdkMemberType" into main 2024-03-21 02:47:59 +00:00
Spandan Das
159b264873 Export JavaBootLibsSdkMemberType and JavaSystemserverLibsSdkMemberType
build/soong/sdk will use these tags to differentiate the sdk and non-sdk
contents of bootclasspath and systemserverclasspath fragments.

Test: go build ./java
Bug: 326246905

Change-Id: Ia8352c09fcbbca06988eb57153e5986801eb45a5
2024-03-20 21:41:49 +00:00
Jihoon Kang
748a24dd6e droidstubs depend on the combined last api filegroup modules
This change creates a "combined" filegroup module, which will contain
all api files of the subset api scopes in the followup change. In this
change, the "combined" filegroup is identical to the currently existing
last api filegroup module in that it only contains the api file /
removed api file of the specific api scope.

This change also passes the "combined" filegroup to the droidstubs
module generated from the sdk_library modules, but this currently does
not lead to any functional changes as the "combined" filegroup is
identical to the currently existing last api filegroup.

Test: m nothing --no-skip-soong-tests
Bug: 321827591
Change-Id: If73a7229f2f970f7e74cd010a8b4808dc9018344
2024-03-20 21:29:39 +00:00
Treehugger Robot
8fd5eb844f Merge "Modify dist artifact dependency to respect the RELEASE_HIDDEN_API_EXPORTABLE_STUBS build flag" into main am: bd339315ca am: 4ce43d4d7a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3008113

Change-Id: I286bf2f627f456c9e3b8a503790f5667f15078f4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-20 12:21:31 +00:00
Treehugger Robot
bd339315ca Merge "Modify dist artifact dependency to respect the RELEASE_HIDDEN_API_EXPORTABLE_STUBS build flag" into main 2024-03-20 11:33:11 +00:00
Jihoon Kang
0216805aae Modify dist artifact dependency to respect the RELEASE_HIDDEN_API_EXPORTABLE_STUBS build flag
Currently, the "exportable" stubs and the api files are copied to the
dist directory during SDK builds regardless of the value of the
RELEASE_HIDDEN_API_EXPORTABLE_STUBS build flag. This change modifies
such behavior that the "exportable" artifacts are copied to the dist
directory only when the RELEASE_HIDDEN_API_EXPORTABLE_STUBS flag value
is set to true.

Test: lunch aosp_arm-trunk_staging-eng && m sdk dist and inspect ninja graph to verify that the "everything" artifacts are copied to the dist directory
Bug: 330417789
Change-Id: I3b83375610eb172d7b9da7ea831a74cd427b696c
2024-03-20 07:45:29 +00:00
Treehugger Robot
0075d3996a Merge "Add aconfig flag support for android_library" into main am: 5c0a491e0a am: d2d9eb3808
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3007351

Change-Id: I49acafe4b994d6afc0b12cff7a4f732e86f8ae04
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-20 01:50:52 +00:00
Treehugger Robot
8793f4b2e6 Merge "Change java stem attribute for both device and host" into main am: 064b145365 am: a0b4138118
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3000681

Change-Id: I74518d8df6b299836801d7c04129ca62e2504e8b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-20 01:50:40 +00:00
Treehugger Robot
5c0a491e0a Merge "Add aconfig flag support for android_library" into main 2024-03-20 01:23:50 +00:00
Treehugger Robot
064b145365 Merge "Change java stem attribute for both device and host" into main 2024-03-20 01:05:50 +00:00
Jihoon Kang
dc2dbaab5f Merge "Propagate intermediateCacheFiles in java modules and filegroup" into main am: 6e739b9b4d am: c46855cedb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3001320

Change-Id: Ied1675ac82cc37ad2ba058483d51fae3f9facd96
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-20 00:59:46 +00:00
Jihoon Kang
6e739b9b4d Merge "Propagate intermediateCacheFiles in java modules and filegroup" into main 2024-03-20 00:08:50 +00:00
Jihoon Kang
9049c2725a Add aconfig flag support for android_library
This change adds the support that was added to android_app in
https://r.android.com/2854663 for android_library modules.

Implementation details:
- Move `Flags_packages` to aaptProperties, so that it can be utilized
  for both android_app and android_library.
- Wrap `VisitDirectDeps` of aconfig_declarations to a function that
  takes a ModuleContext as an input, so that it can be utilized in the
  `GenerateAndroidBuildActions` of both android_app and android_library.

Test: m nothing --no-skip-soong-tests
Bug: 330222981
Change-Id: I8a755f5ca615c8a1651afcd2ec441fc9fbd82c61
2024-03-20 00:06:05 +00:00
Jihoon Kang
705e63e362 Propagate intermediateCacheFiles in java modules and filegroup
This change propagates the intermediateCacheFiles generated by the
aconfig_declarations to the static rdeps that are java modules or the
rdeps that are filegroups.

Test: m nothing
Bug: 329284345
Change-Id: I02431336c1aa0378d03248f3bb6edf2f57ec3b7f
2024-03-19 20:54:05 +00:00
yangbill
2af0b6edd7 Change java stem attribute for both device and host
Bug: 329762127
Test: cd build/soong/java ; go test -run TestJavaLibHostWithStem
Test: cd build/soong/java ; go test -run TestAppStem
Test: cd build/soong/java ; go test -run TestAndroidAppImport_ArchVariants
Test: cd build/soong/java ; go test -run TestOverrideAndroidAppStem
Test: cd build/soong/java ; go test -run TestOverrideAndroidApp
Test: cd build/soong/java ; go test -run TestPackageNameOverride

Change-Id: I8fbdc82116f9a0c68121fbbeb1ef4f78f2b6fea3
2024-03-19 09:11:59 +00:00
Treehugger Robot
2a1e98dc60 Merge "Revert^9 "Enable dex container (DEX v41) for the whole system"" into main am: 84fedd36a4 am: 16ebf41398
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3005894

Change-Id: Ic30a3902facd682af2d91bfe70650c526098d6e3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-19 01:51:48 +00:00
Treehugger Robot
84fedd36a4 Merge "Revert^9 "Enable dex container (DEX v41) for the whole system"" into main 2024-03-19 01:20:15 +00:00
Yuncheol Heo
113654faca Revert^9 "Enable dex container (DEX v41) for the whole system"
This reverts commit b92a4e1ca9.

Reason for revert: tracking the test failure b/329907267

Change-Id: Id3fa8471f073e0ec705fd0aba653b032ff82f9ad
2024-03-18 17:41:12 +00:00
Spandan Das
a249574eed Merge "Support mechanism to select a specific version of module sdk prebuilt" into main am: c36d579c2b am: 91c8756bd2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3005213

Change-Id: If71c7c2184bd902adb32651110ce295c675bb328
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-18 16:45:15 +00:00
Spandan Das
c36d579c2b Merge "Support mechanism to select a specific version of module sdk prebuilt" into main 2024-03-18 15:55:51 +00:00
Spandan Das
e4c911e6fc Support mechanism to select a specific version of module sdk prebuilt
This CL is the platform_compat_config equivalent of aosp/2928483.

{prebuilt_}_platform_compat_config are collated by
`global_compat_config` via a singleton. The collated data is then used
in some CTS tests. At ToT, we ensure that the collation ignores the
platform_compat_config of prebuilt when source is selected, and vice
versa.

With trunk stable, multiple versions of prebuilt apexes and prebuilt
platform compat configs might exist in the tree. This CL uses
`Source_module_name` to hide the platform compat configs of the
unselected prebuilt apexes.

Bug: 322175508

Test: Added a unit test
Change-Id: Iafdde8fc0458b37b3ccde25433070936f144915c
2024-03-16 01:41:12 +00:00
Treehugger Robot
7d53941629 Merge "Create rule to generate the exportable api files when checkapi is disabled" into main am: ce1b16313e am: 7793b9460e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3003278

Change-Id: Ib01a8d6bfb9f7469f1e574975b8911e8687cd084
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-16 00:35:51 +00:00
Treehugger Robot
ce1b16313e Merge "Create rule to generate the exportable api files when checkapi is disabled" into main 2024-03-15 23:58:13 +00:00
Jihoon Kang
36c3d96b65 Create rule to generate the exportable api files when checkapi is disabled
WITHOUT_CHECK_API environment variable enables the checkapi to be
removed from the critical path. The variable is rarely used within AOSP,
but the downstream vendors may depend on it, in order to improve the
build performance given that the api signature file through metalava is
a resource costly task.

Currently, the exportable api files / removed api files are not
generated when checkapi is disabled, but a module may depend on the
exportable api files when a checkapi is disabled. In order to prevent
the missing build rules error in this case, generate the rule to copy
the checked in api file / removed api file to the exportable api file /
removed api file to prevent build errors.

This change also fixes the error message when the OutputFiles(string)
api file is null, to correctly inform the user the error.

Test: m BUILD_FROM_SOURCE_STUB=true WITHOUT_CHECK_API=true && inspect ninja path and verify that "non-updatable-exportable-current.txt" depends on the generated exportable api file.
Bug: 329374072
Change-Id: I24f88d450fb46b6ea9d5920d83617d8228edd34b
2024-03-15 22:30:56 +00:00
David Srbecky
416175d857 Merge "Revert^8 "Enable dex container (DEX v41) for the whole system"" into main am: d10d54af71 am: a561fc032a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2921345

Change-Id: I5a174f90f084a3d7b916b2d4ec473a2de7e53be5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-15 16:43:09 +00:00
David Srbecky
d10d54af71 Merge "Revert^8 "Enable dex container (DEX v41) for the whole system"" into main 2024-03-15 15:42:48 +00:00
Treehugger Robot
1deecc9f9b Merge "Delete jmod workDir" into main am: f34748af55 am: 834f963398
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3004910

Change-Id: I3ea7ec38a43b83045ed4cab86249b069f44b1423
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-15 03:10:25 +00:00
Treehugger Robot
f34748af55 Merge "Delete jmod workDir" into main 2024-03-15 02:35:04 +00:00
Cole Faust
7ef61d76f8 Delete jmod workDir
Files in this directory aren't exposed to the rest of the build, so
deleting them saves some space. The `jmod create` command was also
producing non-deterministic files, which are not relevant because
they're not used anywhere else, but it makes it easier to find
non-determinism that matters if we delete them.

Test: Presubmits
Change-Id: I5d57826b438368f24a7a2a7ab1ccd6c16f240124
2024-03-14 18:15:28 -07:00
Treehugger Robot
aca8f49e54 Merge "Generate info about the selected app variant in platform builds" into main am: 4e4939665e am: b2c91edbba
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3002986

Change-Id: I9fd1efc56101e9eabcfaf92b1ae159b1d7203e09
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-14 22:40:54 +00:00
Treehugger Robot
4e4939665e Merge "Generate info about the selected app variant in platform builds" into main 2024-03-14 22:05:43 +00:00
Treehugger Robot
9292a91a0c Merge "Add exports for JDK 21 to Kythe extractor" into main am: f11f786571 am: 9841e3cd05
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3004350

Change-Id: Ifa1bb5bb213caff7612ab85c06ad58e58349a5f6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-14 19:32:02 +00:00
Yu Liu
b524871548 Merge "Validate aconfig libs are built with the correct modes." into main am: f509eba41d am: b6f0bc02b3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2989874

Change-Id: Ia0e31489f3d8cab59c9b18b9f5e875b03030947e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-14 19:30:48 +00:00
Treehugger Robot
f11f786571 Merge "Add exports for JDK 21 to Kythe extractor" into main 2024-03-14 18:43:02 +00:00
Yu Liu
f509eba41d Merge "Validate aconfig libs are built with the correct modes." into main 2024-03-14 18:39:12 +00:00
Spandan Das
3490dfd23f Generate info about the selected app variant in platform builds
This is a followup to aosp/2999198 and adds information about apps.

Each app will have an entry in this file with the following properties
- Name, mandatory
- Is_prebuilt, mandatory
- Prebuilt_info_file_path, optional

Implementation details
- Move prebuiltInfoProvider out of build/soong/apex to
  build/soong/android. This allows build/soong/java to use it.
- Introduce a new `prebuilt_info` prop to `android_app_set` and
  `android_app_import`
- All app module types will set a prebuiltInfoProvider in
  GenerateAndroidBuildActions, including the source app module types

Test: m nothing --no-skip-soong-tests
Test: m out/soong/prebuilt_info.json
Test: ls -l out/soong/prebuilt_info.json --human-readable
-rw------- 1 spandandas primarygroup 317K Mar 11 23:46 out/soong/prebuilt_info.json

Test: #modified trunk_staging.locally to select prebuilts of some
mainline apps. Spot-checked that `is_prebuilt` and
`prebuilt_info_file_path` get populated appropriately

Bug: 327480225
Change-Id: I5078e0ec26c9568194550909962b90111a5223f7
2024-03-14 18:12:30 +00:00
Sorin Basca
79b7ca1e7a Add exports for JDK 21 to Kythe extractor
Change-Id: Ie977f08f8aee59ea21dcbfe7c9c07dc0dc535775
Fixes: 328877412
Test: TH
2024-03-14 16:59:49 +00:00
David Srbecky
b92a4e1ca9 Revert^8 "Enable dex container (DEX v41) for the whole system"
This reverts commit 43668c6f13.

Reason for revert: Reland

Bug: 317744117
Bug: 329465418
Test: Device boots
Change-Id: I4b0478030c6a4980f33087ec5764018295691bac
2024-03-13 18:49:34 +00:00
Treehugger Robot
21a3203cbf Merge "Use uncompressed dex for all preopted system targets" into main am: fd3921f6bb am: 70d0d2d7aa
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2956760

Change-Id: I76f277e8446796dcd1f713105477a43221d35aa8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-12 03:15:55 +00:00
Treehugger Robot
fd3921f6bb Merge "Use uncompressed dex for all preopted system targets" into main 2024-03-12 01:43:32 +00:00
Sorin Basca
6c47e664cc Revert^2 "Switch to JDK 21"
This reverts commit b832ae19d8.

Reason for revert: Reland Switch to JDK 21 when related issues are resolved.

Bug: 313924276
Change-Id: Ibb5031d9892d1ddc5bc4d2af9885c3192b8ac8ad
Test: TH
2024-03-11 12:31:30 -07:00
Sam Saccone
3379d4e3d8 Merge "Revert "Switch to JDK 21"" into main am: bfa20d7e15 am: e93ae387e8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2994633

Change-Id: Ibe79e815e6002c57e49794b2ebadd858dc5ccc57
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-11 18:59:35 +00:00
Sorin Basca
7f4fa82732 Merge "Revert^2 "Switch to JDK 21"" into main 2024-03-11 18:40:04 +00:00
Sorin Basca
5dfa238f22 Revert^2 "Switch to JDK 21"
This reverts commit b832ae19d8.

Reason for revert: Reland Switch to JDK 21 when related issues are resolved.

Bug: 313924276
Change-Id: Ibb5031d9892d1ddc5bc4d2af9885c3192b8ac8ad
Test: TH
2024-03-11 17:23:06 +00:00