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
Merged-In: Ic79dea080f10f4017f1a75d6d1fb5a3bfe04c2ce
Change-Id: Ic79dea080f10f4017f1a75d6d1fb5a3bfe04c2ce
(cherry picked from commit 1a8010a24171c4ac1928b659f48dc680ee8b0353)
diff --git a/apex/apex.go b/apex/apex.go
index 31dfa0d..c2c1833 100644
--- a/apex/apex.go
+++ b/apex/apex.go
@@ -2096,7 +2096,10 @@
// Get the dexBootJar from the bootclasspath_fragment as that is responsible for performing the
// hidden API encpding.
- dexBootJar := bootclasspathFragmentInfo.DexBootJarPathForContentModule(javaModule)
+ dexBootJar, err := bootclasspathFragmentInfo.DexBootJarPathForContentModule(javaModule)
+ if err != nil {
+ ctx.ModuleErrorf("%s", err)
+ }
// Create an apexFile as for a normal java module but with the dex boot jar provided by the
// bootclasspath_fragment.