Commit Graph

8825 Commits

Author SHA1 Message Date
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
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
Treehugger Robot
c379ea0fd4 Merge "Don't evaluate the enabled property in a defaultable hook" into main 2024-09-12 20:15:20 +00:00
Spandan Das
a7b916b50c Merge "Use -language-version 1.9 in the kotlinKythe build rule" into main 2024-09-12 19:52:30 +00:00
Cole Faust
8eeae4bbbe Don't evaluate the enabled property in a defaultable hook
So that we can decide the configuration after defaults are evaluated.
Instead, pass the enabled property on to submodules.

Bug: 361816274
Test: m nothing --no-skip-soong-tests
Change-Id: I853d557ed022f7434287cea0a2a19e684b59e145
2024-09-12 11:51:04 -07:00
Spandan Das
c911462cbf Merge changes from topic "kotlin_kythe" into main am: 6556d043bd am: d6663871c7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3255897

Change-Id: I4bd62b801647b685f31121c6b2f2a8c77afa1f57
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-12 18:33:39 +00:00
Spandan Das
3d6c6d9c76 Use -language-version 1.9 in the kotlinKythe build rule
There are some instances of .kt code in android platform that are not
fully compatible with kotlinc > 2. To account for this version skew when
generating xrefs, implicitly add `-language-version 1.9` to the args in
the .kzip file. The main kotlinc build rules remain the same.

This value has been picked manually by running
`external/kotlinc/bin/kotlinc -version` at ToT

Bug: 265428637
Test: verified that `-language-version 1.9` is added to the build
command of the .kzip files
Test: ran the indexer locally on the .kzip of `PermissionController-lib`
(this android_library contains .kt code that does not compile with
verison >2)

Change-Id: Icfb72800404d83f63204de23a1ec34b40ee05847
2024-09-12 18:20:59 +00:00
Spandan Das
6556d043bd Merge changes from topic "kotlin_kythe" into main
* changes:
  Add kotlin kzips to build_kzip.bash
  Create .kzip files for kotlin translation units
2024-09-12 18:14:14 +00:00
Treehugger Robot
ad0bd45153 Merge "Remove unused property naming_scheme in java_sdk_library" into main am: 8996dbc91c am: f3aaebba23
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3262081

Change-Id: Ic6cf2c6e56c206c3aa7a2e587933369999b8dd77
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-12 01:59:24 +00:00
Treehugger Robot
8996dbc91c Merge "Remove unused property naming_scheme in java_sdk_library" into main 2024-09-12 01:43:15 +00:00
Jihoon Kang
2261a82dbd Remove unused property naming_scheme in java_sdk_library
The property was introduced as an interim solution, and is currently
unused.

Test: m nothing --no-skip-soong-tests
Bug: 366071058
Change-Id: I57abdb64fabdb34fbbd1190851bc528dbb88c7f8
2024-09-12 00:10:37 +00:00
Spandan Das
1028d5a53f Create .kzip files for kotlin translation units
This CL creates the build rules to invoke the standalone kotlin
extractor and create .kzip files for each kotlin translation unit. These
will be indexed by the internal g3 kotlin indexers

Implementation details
- Create a `kotlinKytheExtract` static rule. Its inputs will be source
  .kt/.srcjar files and other verbatim args passed to kotlinc. The
extrator will serialize this information into a .kzip file. The .kzip
file should contain the necessary information to "replay" the
compilation
- Create a xref_kotlin phony rule to build all .kzip files corresponding
  to kotlin translation units.

This implementation has one limitation. Since the kotlin indexers
"replay" the compilation using its own version of kotlinc-jvm, there
might be indexing issues caused by kotlinc version skew between android
builds and indexing builds. `-kotlin-home` can likely solve that, but
this CL defers that for now.

Bug: 265428637
Test: Built the phony `xref_kotlin`, and ran the indexer locally using go/kythe-git-local-run#indexing-to-local-xrefs-server

Change-Id: Ifb370f2df8aa46f71df3fe1ae7d7aa5da773cc8b
2024-09-11 21:16:24 +00:00
Cole Faust
a2847f62d2 Rename ConfigAndErrorContext to ConfigurableEvaluatorContext am: e8a8783154 am: 7e167d1516
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3263043

Change-Id: I1846d97a9d93b5c80c0f14e9f6f081e358457162
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-11 20:42:25 +00:00
Cole Faust
e8a8783154 Rename ConfigAndErrorContext to ConfigurableEvaluatorContext
I'm going to be adding some methods to this interface, give it
a name based on how it's going to be used, not based on what methods
it contains.

Bug: 323382414
Test: m nothing --no-skip-soong-tests
Change-Id: I9bba04ba756c4dbe00625e2d04af81e78a11cae9
2024-09-11 11:35:46 -07:00
Xin Li
aa8ceca851 Merge "Merge 24Q3 to AOSP main" into main 2024-09-07 01:12:30 +00:00
Treehugger Robot
b35a9f40b9 Merge "Fix ravenizer when transitive classpath is enabled" into main am: 2618069b9f am: 41f189fc81
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3255133

Change-Id: If61b9180fd0a8b0a4c358cfb0c2fab224f2c2659
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-06 23:57:40 +00:00
Treehugger Robot
41f189fc81 Merge "Fix ravenizer when transitive classpath is enabled" into main am: 2618069b9f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3255133

Change-Id: Ief138e5873d79c2eecd08defaa9e1ee9f28dcf41
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-06 23:30:22 +00:00
Treehugger Robot
2618069b9f Merge "Fix ravenizer when transitive classpath is enabled" into main 2024-09-06 23:06:52 +00:00
Colin Cross
7e86385f1b Fix ravenizer when transitive classpath is enabled
Ravenizer and the other rules that modify the output jar also need to
replace the implementation jar depset with the modified output jar.

Bug: 308016794
Test: atest CtsOsTestCasesRavenwood
Flag: build.RELEASE_USE_TRANSITIVE_JARS_IN_CLASSPATH
Change-Id: I87ec143431c09ed878f8e1c3541b56d8077e23b5
2024-09-06 14:42:38 -07:00
Cole Faust
720d25a1e2 Merge "Make the java static_libs property configurable" into main am: 219009f606 am: ace2d9884a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3254302

Change-Id: I9e691f10c574e768392532e22f55ccafbcc3cd34
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-06 18:51:55 +00:00
Cole Faust
ace2d9884a Merge "Make the java static_libs property configurable" into main am: 219009f606
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3254302

Change-Id: I708599b3007151e4e525f5c647f79861d4968923
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-06 18:41:58 +00:00
Cole Faust
219009f606 Merge "Make the java static_libs property configurable" into main 2024-09-06 18:36:35 +00:00
Treehugger Robot
63abf09fd9 Merge "Remove asset dir glob files" into main am: f2c204c655 am: 9d269b6956
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3257951

Change-Id: I14d1f997a18e08b46333c5bcf376b5841d34e8b3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-06 16:42:36 +00:00
Colin Cross
ab8082c117 Merge "Use transitive header jars in classpaths" into main am: 399ff4019d am: f6c08dba54
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3214782

Change-Id: Ia95c786776fdfba7b1e0144febce6f0ecd5984dc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-06 16:42:19 +00:00
Treehugger Robot
9d269b6956 Merge "Remove asset dir glob files" into main am: f2c204c655
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3257951

Change-Id: I49203ac5f042cad529c4f5f56186f4385a5126b4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-06 16:31:20 +00:00
Colin Cross
f6c08dba54 Merge "Use transitive header jars in classpaths" into main am: 399ff4019d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3214782

Change-Id: I034fe6ddbd7bcafb40807cd00973d7f0f36e6339
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-06 16:30:58 +00:00
Treehugger Robot
f2c204c655 Merge "Remove asset dir glob files" into main 2024-09-06 16:22:06 +00:00
Colin Cross
399ff4019d Merge "Use transitive header jars in classpaths" into main 2024-09-06 16:19:41 +00:00
Treehugger Robot
6666d6bb1c Merge changes I505a7ad8,I92d88199 into main am: fae5ec8bbc am: 68168d7b56
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3258011

Change-Id: I3ff37fd8fe971ffc9cab1fc164fe9885abad7015
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-06 06:27:44 +00:00
Treehugger Robot
68168d7b56 Merge changes I505a7ad8,I92d88199 into main am: fae5ec8bbc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3258011

Change-Id: I227940176b231d987f6b8481e624af178c7d3d5b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-06 06:16:13 +00:00
Treehugger Robot
fae5ec8bbc Merge changes I505a7ad8,I92d88199 into main
* changes:
  Disable source apex variant using apex_available_name
  Skip `contents` validation of source bootclasspath fragments
2024-09-06 06:07:42 +00:00
Spandan Das
003452ff9c Disable source apex variant using apex_available_name
There are two versions of aosp extservices - one for Tplus and one for
Sminus. When prebuilts are active, the `contents` validation of both
variants of extservices bootclasspath fragments should be disabled to
account for BCP jar skew.

This CL adds ApexAvailableName to ApexInfo to achive that. If an
api_domain matching the ApexAvailableName has been selected in
`all_apex_contributions`, the source apex variants will be disabled.

Bug: 361771739

Test: lunch cf_x86_64_phone-next-userdebug
Test: m nothing with ag/28851886
Change-Id: I505a7ad8295c258e2eeef7f183669f7a75a1c88e
2024-09-06 05:10:41 +00:00
Spandan Das
1679192d7d Skip contents validation of source bootclasspath fragments
... if prebuilts are selected.

This is a special case of b/361771739 where a apex starts contributing a
jar to the BCP. `disableSourceApexVariant` uses
`PrebuiltSelectionInfoProvider` and this gets populated via the
following dep chain
```
source --> prebuilt --> all_apex_contributions
```

This runs into issues if a prebuilt bootclasspath_fragment does not
exist.

This CL creates a dependency edge between the source module and
all_apex_contributions singleton module so that
`PrebuiltSelectionInfoProvider` is available for
`disableSourceApexVariant`

Bug: 361771739
Test: lunch cf_x86_64-next-userdebug
Test: m nothing with ag/28851886
Change-Id: I92d88199a27579d3c9879d40fd354653370efcce
2024-09-06 05:10:29 +00:00
Cole Faust
6265120cd2 Remove asset dir glob files
I'm rewriting how globs work in soong to make them compatible with
hash-based ninja implementations. As part of this, I'm removing this
unnecessary usage of globs to make them simpler.

In this case, since we're already globbing the directory at analysis
time and causing soong to rerun, we can ensure the aapt2 action also
reruns by putting a hash of the glob results onto the command line.

Bug: 364749114
Test: m framework-res, touch frameworks/base/core/res/assets/test1.txt, m framework-res rebuilt framework-res.apk, rm frameworks/base/core/res/assets/test1.txt, m framework-res rebuilt framework-res.apk again
Change-Id: I4f666367a9a0fd0dfa42dc51ef3a788a02b41747
2024-09-05 16:36:32 -07:00
Colin Cross
eebf7d8553 Merge "Remove obsolete robolectric test runner integration" into main am: 151446cb41 am: 392aae7702
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3254252

Change-Id: I813b1226291ab644d010f2c0361f864c8c1fa1f4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-05 21:18:59 +00:00
Cole Faust
b749347fa5 Make the java static_libs property configurable
Bug: 362579941
Test: m nothing --no-skip-soong-tests
Change-Id: Iccc93cf14753aae1adb26c6eedd00aabf1c2f6a6
2024-09-05 14:16:37 -07:00