Commit Graph

8859 Commits

Author SHA1 Message Date
Spandan Das
9e2377907d Merge changes I0edb681b,I0ea2327f into main am: e2860d9db6 am: c012f4ece4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3273493

Change-Id: Iaa74e0c7332c9a3e8a5180db3bac0abd7edc4318
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-23 21:18:32 +00:00
Spandan Das
e2860d9db6 Merge changes I0edb681b,I0ea2327f into main
* changes:
  Remove internal deapexer module
  Remove deapex support from java_*_import
2024-09-23 20:28:36 +00:00
Zhi Dou
168b3f8581 Merge "pass read new storage parameter to java codegen" into main 2024-09-23 19:49:07 +00:00
Zhi Dou
9cf2e8e140 pass read new storage parameter to java codegen
When RELEASE_READ_FROM_NEW_STORAGE is true, enable reading from new
storage. So that we can ensure nextfood is not impacted.

Test: m and check cf
Bug: 349874828
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:c98032785339de11e34ee3d4f94b3ec3ed70d324)
Merged-In: Id12816206a16b17c23e3a53832d268f1600107b3
Change-Id: I95ad9457e6d9c07a5a5b3074045a383f004113a9
2024-09-23 19:29:41 +00:00
Jihoon Kang
2d404031e7 Merge changes Ica0cb5a5,If432cdc6,Idb4b0b0a into main am: 1a7d900c78 am: a7906c717c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3272004

Change-Id: I3893d25882248f645c37718793907b7a1a64f0f1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-23 18:21:01 +00:00
Spandan Das
52c01a1897 Remove internal deapexer module
The build ations will be created by the top-level apex.

Details
1. In GenerateAndroidBuildActions, do a graph walk to determine if the
   apex has exported deps.
2. If there are exported deps, call the newly introduced `deapex`
   function. This registers the build rules and returns a DeapexerInfo
object. This was previously provided by the internal deapexer
dependency.
3. Update `dexpreoptSystemServerJars and `provideApexExportsInfo` to use
   the DeapexerInfo object from (2).

A lot of unit tests that relied on the legacy mechanism of deapexing
have been updated.

Test: go test ./apex
Test: lunch cf_x86_64_phone-next-userdebug (uses mainline prebuilts)
Test: verified no diff in file_list.txt
Bug: 368337090
Change-Id: I0edb681beccac4d2a9ceb73f9a506c081a8a96e0
2024-09-20 23:47:36 +00:00
Spandan Das
a326b320ab Remove deapex support from java_*_import
prebuilt_apex/apex_set currently supports its deapexed contents to be
returned via a sibling java_import/java_sdk_import module. This is
necesssary for
1. dexpreopt/hiddenapi processing
2. usage as shared library

(1) is no longer necessary. this information is provided by the
top-level prebuilt apexes now

(2) is no longer possible since `exported_java_libs` has been removed in
https://r.android.com/3272110

This CL uses a hack for java_sdk_library_improt. Even though (1) is
provided by the top-level apex, there are still some places where
dexpreopt/hiddenapi processing visits the import modules. This CL uses
a bogus path to make analysis work. If this bogus path gets used, there
will be an error during ninja execution

Test: go test ./apex
Test: in internal lunch cf_x86_64_phone-next-userdebug (uses mainline
prebuilts)
Test: verified that file_list.txt is same
Bug: 368337090

Change-Id: I0ea2327f648f0fc60e337b232f7265e140772ffd
2024-09-20 23:33:09 +00:00
Jihoon Kang
da923b0ae3 Revert^2 "Remove java_sdk_library "magic""
This change removes the java_sdk_library to submodule calculus logic,
i.e. the "magic". The "magic" is no longer being used, as all existing
usages have been fixed to specify the submodule that it actually depends
on.

Test: m nothing --no-skip-soong-tests
Bug: 368144555
Change-Id: Ica0cb5a51d7a8192c2402c0c50ac35cb0b4df0a2
2024-09-20 21:57:19 +00:00
Jihoon Kang
c4db1092a8 Revert^2 "Restrict java_sdk_library in libs of java_import and droidstubs modules"
These are all remaining usages of "magic", which are being removed with
this change. The follow up change will remove the "magic".

Test: m nothing --no-skip-soong-tests
Bug: 366069293
Change-Id: If432cdc6621ac00564e14acbaefca53db1723686
2024-09-20 21:56:08 +00:00
Jihoon Kang
28c9657e24 Revert^2 "Restrict java_sdk_library in libs"
Instead, the module should specify the submodule it actually depends on.
This is a prereq change to removing the java_sdk_library "magic"

Test: m nothing --no-skip-soong-tests
Bug: 366069293
Change-Id: Idb4b0b0a953f5391c24e50294c940522b73c34f2
2024-09-20 21:55:23 +00:00
Jihoon Kang
8ee926b246 Merge changes from topic "revert-3271699-IARRNEVQHI" into main am: 6c0a5d9d30 am: a8ecee9f76
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3273159

Change-Id: I1a3f3dbe9d4c5165d7e0e746054d03e203893838
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-20 18:10:51 +00:00
Liana Kazanova
90819c7145 Revert "Remove java_sdk_library "magic"" am: 4340863ed9 am: 32eaaaacf2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3273158

Change-Id: I87b6875323e2069b4d3ff6b8f73beb0aa631e6dd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-20 18:10:47 +00:00
Jihoon Kang
6c400b85b0 Merge "Revert "Restrict java_sdk_library in libs"" into main am: 46e0613992 am: 96960c9be0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3273157

Change-Id: I1d2d92a11e7d503ff5ac8f0a2b924d3e43a2ed98
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-20 18:10:39 +00:00
Liana Kazanova
32eaaaacf2 Revert "Remove java_sdk_library "magic"" am: 4340863ed9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3273158

Change-Id: I547d5b1e511a846a8444bac8817e12109ea1b7d0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-20 17:37:03 +00:00
Jihoon Kang
6c0a5d9d30 Merge changes from topic "revert-3271699-IARRNEVQHI" into main
* changes:
  Revert "Restrict java_sdk_library in libs of java_import and dro..."
  Revert "Remove java_sdk_library "magic""
2024-09-20 17:17:32 +00:00
Jihoon Kang
46e0613992 Merge "Revert "Restrict java_sdk_library in libs"" into main 2024-09-20 17:17:32 +00:00
Liana Kazanova
4340863ed9 Revert "Remove java_sdk_library "magic""
Revert submission 3271699

Reason for revert: DroidMonitor: Potential culprit for http://b/368606825 - verifying through ABTD before submission. 

Reverted changes: /q/submissionid:3271699

Change-Id: If40f7956e699246cf1d72ffc50ffffa4696504df
2024-09-20 17:09:21 +00:00
Liana Kazanova
6a32dfdb86 Revert "Restrict java_sdk_library in libs of java_import and dro..."
Revert submission 3271699

Reason for revert: DroidMonitor: Potential culprit for http://b/368606825 - verifying through ABTD before submission. 

Reverted changes: /q/submissionid:3271699

Change-Id: I65f0e10eb775fd08dd958b699ce1191da7ce0669
2024-09-20 17:09:21 +00:00
Jihoon Kang
33cbd37c00 Revert "Restrict java_sdk_library in libs"
This reverts commit 125efc6c30.

Reason for revert: b/368606825

Change-Id: Ia24f637db202f24be2ee13c7fe78e19a69576ffa
2024-09-20 17:09:09 +00:00
Treehugger Robot
1524fe1e61 Merge changes I653bd734,I4762682c into main am: 96f04689a9 am: 534c5c4dfd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3271699

Change-Id: I087d472c5b9078b495248a2a05272b9caf45a40e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-20 16:39:32 +00:00
Treehugger Robot
d2451a705e Merge "Restrict java_sdk_library in libs" into main am: 37b288262e am: e62209b025
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3261983

Change-Id: I7d61ad2c765bea828f094feda856736ab6e8d9bd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-20 16:39:11 +00:00
Jihoon Kang
25dc02902a Remove java_sdk_library "magic"
This change removes the java_sdk_library to submodule calculus logic,
i.e. the "magic". The "magic" is no longer being used, as all existing
usages have been fixed to specify the submodule that it actually depends
on.

Test: m nothing --no-skip-soong-tests
Bug: 368144555
Change-Id: I653bd734959c3366a40f003274c921b012be24ca
2024-09-19 21:45:01 +00:00
Jihoon Kang
0d28fd30e5 Restrict java_sdk_library in libs of java_import and droidstubs modules
These are all remaining usages of "magic", which are being removed with
this change. The follow up change will remove the "magic".

Test: m nothing --no-skip-soong-tests
Bug: 366069293
Change-Id: I4762682cb8696b435b9f0fb0f4c55ba2fa865f05
2024-09-19 21:44:40 +00:00
Jihoon Kang
125efc6c30 Restrict java_sdk_library in libs
Instead, the module should specify the submodule it actually depends on.
This is a prereq change to removing the java_sdk_library "magic"

Test: m nothing --no-skip-soong-tests
Bug: 366069293
Change-Id: I9137c079afc7abf201e597e323ae7de415eea0dc
2024-09-19 21:44:20 +00:00
Treehugger Robot
47ace291a7 Merge "Make dexpreopt properties configurable" into main am: 37842ac3b1 am: 3927f7aef3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3273573

Change-Id: If970a73050fa657f4f14a63e20ca6fbc2eca16e7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-19 19:20:02 +00:00
Cole Faust
eb03246f6f Make dexpreopt properties configurable
Spurred by ag/27778860

Test: m nothing --no-skip-soong-tests
Change-Id: I0e48144172eee1c589f46875cd94e3aa19d43873
2024-09-19 11:12:54 -07:00
Treehugger Robot
e1f70a0af2 Merge "Add default_visibility for soong modules" into main am: fc79aabd84 am: 3b36ffb65f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3271955

Change-Id: I3712fefedf8f3114563355261f7f22ef9ce9c374
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-19 02:24:55 +00:00
Cole Faust
16d227a725 Add default_visibility for soong modules
So that we don't get surprise usages.

Bug: 348717861
Test: m nothing
Change-Id: I47319a727092c1bd936cca88f5713ee977a48b48
2024-09-18 17:41:30 -07:00
Makoto Onuki
12c1aa9cf2 Merge "Fix resource-apk inclusion" into main am: 1fa2cf0f88 am: 9b00bf3ecf
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3270523

Change-Id: I14207bcca8e2bd45fcd77f09fa04175eff54eb04
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-18 19:39:16 +00:00
Makoto Onuki
1fa2cf0f88 Merge "Fix resource-apk inclusion" into main 2024-09-18 19:12:56 +00:00
Treehugger Robot
34d659ccb8 Merge "Align CLC add context behavior between java_sdk_library and its impl lib" into main am: feeb6d1e7b am: 5f2bd29169
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3267383

Change-Id: I7578b3e7225d9c108c66118bd0cbd89b0bf70db2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-18 18:24:45 +00:00
Treehugger Robot
feeb6d1e7b Merge "Align CLC add context behavior between java_sdk_library and its impl lib" into main 2024-09-18 17:34:00 +00:00
Jihoon Kang
ddda6ea7d3 Align CLC add context behavior between java_sdk_library and its impl lib
This change allows the impl lib of java_sdk_library to call AddContext(...) instead of AddContextMap(...) and ensure that the behavior between the top level java_sdk_library and the impl lib is identical when creating the class loader context.

Test: CI && ABTD
Bug: 366572133
Change-Id: Ia0bc7558ca737fcd3ad4ed62b3190aa567aa103f
2024-09-18 16:46:38 +00:00
Rico Wind
62cb2dd6b7 Merge "Launch flag guarded always on optimized resource shrinking" into main am: 15c5e54de7 am: 2df97e944d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3241280

Change-Id: I820281a8a2b272908cb60aeeae4279faa5688fbb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-18 08:27:43 +00:00
Rico Wind
15c5e54de7 Merge "Launch flag guarded always on optimized resource shrinking" into main 2024-09-18 07:31:54 +00:00
Makoto Onuki
7847ba2eef Merge "Make compat-config to generate output files too" into main am: a191ef3c54 am: df6d6e8ffe
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3270756

Change-Id: I550e2de45511bca5aa9e579c16f2f646fff061ce
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-17 19:33:30 +00:00
Makoto Onuki
a191ef3c54 Merge "Make compat-config to generate output files too" into main 2024-09-17 18:29:23 +00:00
Treehugger Robot
8c0c9b73ef Merge "Pass the common sources rsp file as --common_srcs to extractor" into main am: 1c8c5698ec am: cc64154a60
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3267541

Change-Id: I57c34e05354db9c106a086dc8b5aab4ac85b089e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-17 18:10:52 +00:00
Treehugger Robot
1c8c5698ec Merge "Pass the common sources rsp file as --common_srcs to extractor" into main 2024-09-17 17:49:54 +00:00
Makoto Onuki
ed392f7097 Fix resource-apk inclusion
- We used to include the "install" files, but we really should be using
"output" files instead.

- Also supports a new "inst_resource_apk" property, which is another APK
that's loaded as resources of the instrumentation app itself.

Flag: EXEMPT host test change only
Bug: 292141694
Test: m nothing --no-skip-soong-tests
Test: manual test with a local test module change and make sure
    the second apk exists

Change-Id: Ibd3f9d4a1cbc0f805b2294605ae8bc06fdf53b75
2024-09-17 10:03:24 -07:00
Makoto Onuki
ca678c4a36 Make compat-config to generate output files too
Flag: EXEMPT host test change only
Bug: 367706429
Test: m nothing --no-skip-soong-tests
Test: `m ravenwood-runtime` and make sure out/host/linux-x86/testcases/ravenwood-runtime/ravenwood-data/
    has framework-platform-compat-config.xml and services-platform-compat-config.xml
Change-Id: I92b545c480890815cd886b8ecf50ed99ffe7eea1
2024-09-17 09:53:33 -07:00
Ulya Trofimovich
7d37960e1f Merge "Revert^12 "Enable dex container (DEX v41) for the whole system"" into main am: 9d96d1f186 am: 0eff90b320
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3212295

Change-Id: I48da5f8c2753499099a148a0c38ced3a8c52cc7c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-17 15:32:14 +00:00
Ulya Trofimovich
9d96d1f186 Merge "Revert^12 "Enable dex container (DEX v41) for the whole system"" into main 2024-09-17 14:01:55 +00:00
Ulya Trofimovich
5bb46810a5 Revert^12 "Enable dex container (DEX v41) for the whole system"
This reverts commit 78fccd9380.

Reason for revert: test failure in can no longer be reproduced.

Bug: 353452237
Change-Id: I7cf926342efc612b4026d89df12078c018ede7b9
2024-09-16 18:58:53 +00:00
Treehugger Robot
05769c76d2 Merge "[Ravenwood] Support fonts files and data files" into main am: e372d287c0 am: 004b8fa8fe
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3268351

Change-Id: Ie4477423aaa9ef38c9995b0fcbc6f3c08b3cb854
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-14 00:12:13 +00:00
Spandan Das
67136e14f3 Pass the common sources rsp file as --common_srcs to extractor
This additional metadata allows the indexer to differentiate between
platform specific and platform agnostic kotlin code.

Bug: 3266381
Test: ran the indexer on `kotlinx_serialization_core` java_library
Change-Id: I860552808198cafa95fe0d5b6faa725b985e24d0
2024-09-13 22:12:45 +00:00
John Wu
680cd73e1a [Ravenwood] Support fonts files and data files
Add support to include font files into ravenwood_libgroup. Also make ravenwood data property to accept paths instead of module name. 

Bug: 292141694
Flag: EXEMPT host side change only
Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh
Change-Id: Ida5ef0230d2cc59fa1209199168c6c35e4842fbd
2024-09-13 20:59:05 +00:00
Rico Wind
a7b38592f8 Launch flag guarded always on optimized resource shrinking
This will use the RELEASE_USE_OPTIMIZED_RESOURCE_SHRINKING_BY_DEFAULT flag - default enabling in trunk staging will be done in a follow up cl

To disable optimized resource shrinking on an app basis one can opt out with
  optimized_shrink_resources: false
bug please file a bug for us to find out why (so that we can remove legacy mode)

Bug: 325905703
Test: Existing
Change-Id: Idb57b8e6bba26f06c044657492ff4ae89ec81254
2024-09-13 09:12:56 +00:00
Treehugger Robot
cf9a26272a Merge "Don't evaluate the enabled property in a defaultable hook" into main am: c379ea0fd4 am: 9e67f9499a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3264841

Change-Id: Ie75437c9cd18539d3a670080f40378e6a4a49d94
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-12 20:42:00 +00:00
Spandan Das
38605e5667 Merge "Use -language-version 1.9 in the kotlinKythe build rule" into main am: a7b916b50c am: c1ced44f0a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3263501

Change-Id: I593bc349b4821fe2d7a795fc7a803ef53c7ff4d8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-12 20:35:04 +00:00