Use two-column format for PRODUCT_BOOT_JARS components.
The first component is the apex name, or a special name "platform"
if the boot jar is a platform jar rather than a part of some apex.
This is a prerequisite change for moving core-icu4j to a separate
com.android.i18n apex.
Old one-column format is still supported, but all unqualified
components of PRODUCT_BOOT_JARS get "platform:" prepended to them
after reading the product makefiles.
Test: aosp_walleye-userdebug boots
Bug: 138994281
Change-Id: Ic229159fdcdaf6182210a53b63850a389dd786fc
diff --git a/android/config.go b/android/config.go
index c297b05..ee31c10 100644
--- a/android/config.go
+++ b/android/config.go
@@ -906,13 +906,18 @@
return apexJarPair[0], apexJarPair[1]
}
-func (c *config) BootJars() []string {
- jars := c.productVariables.BootJars
- for _, p := range c.productVariables.UpdatableBootJars {
+func GetJarsFromApexJarPairs(apexJarPairs []string) []string {
+ modules := make([]string, len(apexJarPairs))
+ for i, p := range apexJarPairs {
_, jar := SplitApexJarPair(p)
- jars = append(jars, jar)
+ modules[i] = jar
}
- return jars
+ return modules
+}
+
+func (c *config) BootJars() []string {
+ return append(GetJarsFromApexJarPairs(c.productVariables.BootJars),
+ GetJarsFromApexJarPairs(c.productVariables.UpdatableBootJars)...)
}
func (c *config) DexpreoptGlobalConfig(ctx PathContext) ([]byte, error) {