Store dex jar paths in bootclasspath_fragment's apex content info

Previously, the DexBootJarPathForContentModule(module) simply called
directly through to the module to retrieve the dex jar path. This
change changes it so the bootclasspath_fragment retrieves the dex
jars from the module and stores them in the info structure for this
method to retrieve directly.

This makes it easier for the bootclasspath_fragment to stop retrieving
hidden API encoded dex jars from the module and perform the encoding
itself.

Bug: 179354495
Test: m com.android.art com.android.ipsec com.android.os.statsd com.android.conscrypt
      - verify that this does not change the contents of the apex files
Change-Id: Ic79dea080f10f4017f1a75d6d1fb5a3bfe04c2ce
This commit is contained in:
Paul Duffin
2021-05-15 12:39:23 +01:00
parent 4de9450433
commit 1a8010a241
3 changed files with 55 additions and 10 deletions

View File

@@ -512,7 +512,10 @@ func TestBootclasspathFragmentContentsNoName(t *testing.T) {
checkFragmentExportedDexJar := func(name string, expectedDexJar string) {
module := result.Module(name, "android_common_apex10000")
dexJar := info.DexBootJarPathForContentModule(module)
dexJar, err := info.DexBootJarPathForContentModule(module)
if err != nil {
t.Error(err)
}
android.AssertPathRelativeToTopEquals(t, name+" dex", expectedDexJar, dexJar)
expectedCopyCommand := fmt.Sprintf("&& cp -f %s out/soong/.intermediates/myapex/android_common_myapex_image/image.apex/javalib/%s.jar", expectedDexJar, name)