Commit Graph

8799 Commits

Author SHA1 Message Date
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
Colin Cross
392aae7702 Merge "Remove obsolete robolectric test runner integration" into main am: 151446cb41
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3254252

Change-Id: Ib1d5f7a2fa7491e1ecbb4873513c182d309275f1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-05 21:07:40 +00:00
Colin Cross
c9b4f6b502 Use transitive header jars in classpaths
Skip combining jars into turbine-combined, combined, and withres jars
and instead collect transitive jars to use in the classpath and to
produce the final dexed jar.

This reduces the size of a `m checkbuild` in git_main by 11%, from
1300 KiB to 1154 KiB.  It may also improve caching and reduce uplink
network bandwidth when building with RBE, as now the classpath inputs
to rules are themselves outputs of previous rules and so already in
the RBE CAS.

The downside is that the classpath inputs to each rule are now much
longer, increasing the Soong ninja file size 11%, from 4.6 GiB to
5.1 GiB.  This could be mitigated in the future by supporting something
like depsets in the generated ninja file to reduce duplication.

Bug: 308016794
Test: TestSimple, TestKotlin, TestClasspath
Flag: build.RELEASE_USE_TRANSITIVE_JARS_IN_CLASSPATH
Change-Id: I2b7b4261375494370da70f98597c8719f1d561cf
2024-09-04 16:13:46 -07:00
Colin Cross
fdaa672ad1 Remove obsolete robolectric test runner integration
The `m Run*RoboTests` test runner is no longer supported, remove the
code to generate the Make rules for it.

Also reduce the number of combining steps by passing the extra jars
that need to be combined into the compile step.

This relands Icf05079bf570bed7a10962cbf03459bd53c51f99 with a fix to
reorder the instrumented app classes after dependency classes.

Test: atest --host SystemUiRoboTests
Flag: EXEMPT refactor
Change-Id: I174ceb95af5557e1859eeb12a2f5fac2332975a8
2024-09-04 15:47:11 -07:00
Yu Liu
e97a9ce7cd Merge "Move the caching/restoring code from soong to blueprint to fully skip build actions." into main am: c55b25f125 am: 246315e4fd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3249489

Change-Id: Ib5b0b6fde2d99eb2c0b2c5d8f5595b194af91cd9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-04 22:17:13 +00:00
Yu Liu
246315e4fd Merge "Move the caching/restoring code from soong to blueprint to fully skip build actions." into main am: c55b25f125
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3249489

Change-Id: I43e2ee71097e95e313eab8631742acb8048e36d4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-04 22:07:50 +00:00
Yu Liu
c55b25f125 Merge "Move the caching/restoring code from soong to blueprint to fully skip build actions." into main 2024-09-04 22:01:33 +00:00
Treehugger Robot
4ec217524f Merge "Revert "Remove obsolete robolectric test runner integration"" into main am: b94fef7278 am: e6a426338a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3255302

Change-Id: I2f71b3d938b599ddb97878ac300d74c431bf3dea
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-04 21:56:26 +00:00
Treehugger Robot
e6a426338a Merge "Revert "Remove obsolete robolectric test runner integration"" into main am: b94fef7278
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3255302

Change-Id: I0a94ada98ac9fbcc396fc95456be8f6c31e0b02a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-04 21:46:52 +00:00
Treehugger Robot
b94fef7278 Merge "Revert "Remove obsolete robolectric test runner integration"" into main 2024-09-04 21:36:08 +00:00
Priyanka Advani (xWF)
72853677e8 Revert "Remove obsolete robolectric test runner integration"
This reverts commit ef5739ed64.

Reason for revert: Droidmonitor created revert due to b/364665936.

Change-Id: Ia18f642492eafdbe2e78d9f753d87f243d529037
2024-09-04 20:15:58 +00:00
Yu Liu
26a716d5e5 Move the caching/restoring code from soong to blueprint to fully skip build actions.
Bug: 358425833
Test: Manually verified the generated ninja and mk files and CI.
Change-Id: Ieebb822c46f37c0ff55fad08531e9870a76cbd7b
2024-09-04 19:59:55 +00:00
Colin Cross
5cd84af1b7 Merge "Rename collectTransitiveHeaderJars and friends to mention R8" into main am: 13d8e82c5e am: 0b98048d32
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3216678

Change-Id: I358236ae53ded43ef9ebb7373fdd000898600314
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-04 18:01:57 +00:00
Colin Cross
0b98048d32 Merge "Rename collectTransitiveHeaderJars and friends to mention R8" into main am: 13d8e82c5e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3216678

Change-Id: I8a425dc292fd5ce81a2e5343fd18f21fa3d472d6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-04 17:45:05 +00:00
Colin Cross
13d8e82c5e Merge "Rename collectTransitiveHeaderJars and friends to mention R8" into main 2024-09-04 17:34:03 +00:00
Colin Cross
eb473d2495 Merge "Remove obsolete robolectric test runner integration" into main am: b09e8ec23c am: 2a3878da24
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3238457

Change-Id: Ia968dc4e9626a80f664377c43f90eca80f8336a4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-04 17:24:31 +00:00
Colin Cross
3946f9e367 Merge "Move checkbuild targets of Soong modules into Soong" into main am: ca3bf2be39 am: 5f0561e24d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3237626

Change-Id: Ib035416676ead421eea1860e5420a2d8b987030e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-04 17:24:17 +00:00
Colin Cross
2a3878da24 Merge "Remove obsolete robolectric test runner integration" into main am: b09e8ec23c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3238457

Change-Id: Icbf2db1a86565385705723197edd3103453baddd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-04 17:24:02 +00:00
Colin Cross
b09e8ec23c Merge "Remove obsolete robolectric test runner integration" into main 2024-09-04 17:21:47 +00:00
Colin Cross
5f0561e24d Merge "Move checkbuild targets of Soong modules into Soong" into main am: ca3bf2be39
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3237626

Change-Id: Id72a093f81785ece92211cc63a73c0a53576fb7b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-04 17:15:12 +00:00
Colin Cross
ca3bf2be39 Merge "Move checkbuild targets of Soong modules into Soong" into main 2024-09-04 17:12:03 +00:00
Yihan Dong
34ffc2e337 Merge "Apply apimapper instrument tool on android tests" into main am: a596b12878 am: b5c5c1a8de
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3249673

Change-Id: I30973ce9341aabf54ef96cf4c9fefc35aa4c7845
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-04 01:01:34 +00:00
Yihan Dong
b5c5c1a8de Merge "Apply apimapper instrument tool on android tests" into main am: a596b12878
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3249673

Change-Id: Ifd8f3a190c3794aed0dec5d872915fa294440db7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-04 00:59:51 +00:00
Yihan Dong
a596b12878 Merge "Apply apimapper instrument tool on android tests" into main 2024-09-04 00:52:09 +00:00
Colin Cross
ef5739ed64 Remove obsolete robolectric test runner integration
The `m Run*RoboTests` test runner is no longer supported, remove the
code to generate the Make rules for it.

Also reduce the number of combining steps by passing the extra jars
that need to be combined into the compile step.

Test: atest --host SystemUiRoboTests
Flag: EXEMPT refactor
Change-Id: Icf05079bf570bed7a10962cbf03459bd53c51f99
2024-09-03 14:52:26 -07:00
Colin Cross
9ffaf28f5f Rename collectTransitiveHeaderJars and friends to mention R8
collectTransitiveHeaderJarsForR8 visits direct dependencies and collects
all transitive libs and static_libs header jars.  The semantics of the
collected jars are odd (it collects combined jars that contain the static
libs, but also the static libs, and it collects transitive libs dependencies
of static_libs), so these are only used to expand the --library arguments
to R8.  Rename the method and all the fields it uses with a "ForR8"
suffix to avoid confusion when more transitive header jar collection is
added to support transitive classpaths.

Bug: 308016794
Test: all soong tests pass
Change-Id: I291a86fbbc2e2f088598fb309d1b992080d60941
2024-09-03 14:52:26 -07:00
Colin Cross
a6182ab2fa Move checkbuild targets of Soong modules into Soong
Pass the name of Soong's checkbuild target for each module to
Make so that it can depend on it from the main checkbuild rule.
This will give better control over which files get built, allowing
checkbuild to skip the jar combining step when transitive classpath
jars are enabled.  The per-module checkbuild targets are passed to
make instead of added directly as a dependency of checkbuild in order
to maintain the existing behavior of only building modules exposed
to make in checkbuild.

Also tweak the existing calls to CheckbuildFile and add
InstallFileWithoutCheckbuild to match the files that are
in the Make-based checkbuild.

Bug: 308016794
Test: m checkbuild
Change-Id: Ic5140819381d58f4d00f23a7a12447950c4cf268
2024-09-03 14:52:19 -07:00