Use the correct mainline BCP jars for app dexpreopt.
Before this change, the build system had special logic to find mainline
BCP jars and copy them to a special location for app dexpreopt. This
logic doesn't work on `next`. In fact, we don't need this logic anymore.
Since we are now generating the mainline boot image extension, we can
reference the inputs of the mainline boot image extension, which are
exactly the mainline BCP jars needed for app dexpreopt.
Bug: 309302263
Test: atest art_standalone_dexpreopt_tests (on next)
Test: m --no-skip-soong-tests nothing
Change-Id: I055018ffbc5d7e5678f305e65a7f1c7e73bf3b99
diff --git a/apex/apex_test.go b/apex/apex_test.go
index e6581cf..ddb9a40 100644
--- a/apex/apex_test.go
+++ b/apex/apex_test.go
@@ -5459,7 +5459,7 @@
checkBootDexJarPath := func(t *testing.T, ctx *android.TestContext, stem string, bootDexJarPath string) {
t.Helper()
- s := ctx.ModuleForTests("platform-bootclasspath", "android_common")
+ s := ctx.ModuleForTests("dex_bootjars", "android_common")
foundLibfooJar := false
base := stem + ".jar"
for _, output := range s.AllOutputs() {
@@ -5909,8 +5909,8 @@
`
ctx := testDexpreoptWithApexes(t, bp, "", preparer, fragment)
- checkBootDexJarPath(t, ctx, "libfoo", "out/soong/.intermediates/libfoo/android_common_apex10000/hiddenapi/libfoo.jar")
- checkBootDexJarPath(t, ctx, "libbar", "out/soong/.intermediates/libbar/android_common_myapex/hiddenapi/libbar.jar")
+ checkBootDexJarPath(t, ctx, "libfoo", "out/soong/.intermediates/my-bootclasspath-fragment/android_common_myapex/hiddenapi-modular/encoded/libfoo.jar")
+ checkBootDexJarPath(t, ctx, "libbar", "out/soong/.intermediates/my-bootclasspath-fragment/android_common_myapex/hiddenapi-modular/encoded/libbar.jar")
// Verify the correct module jars contribute to the hiddenapi index file.
checkHiddenAPIIndexFromClassesInputs(t, ctx, ``)