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: I0f79c7d10477880ca65354251a5d1ca0b7ce79ab
diff --git a/core/java.mk b/core/java.mk
index 6798efa..61a3ad3 100644
--- a/core/java.mk
+++ b/core/java.mk
@@ -501,9 +501,9 @@
$(transform-classes.jar-to-dex)
endif
-ifneq ($(filter $(LOCAL_MODULE),$(PRODUCT_BOOT_JARS)),)
- $(call pretty-error,Modules in PRODUCT_BOOT_JARS must be defined in Android.bp files)
-endif
+$(foreach pair,$(PRODUCT_BOOT_JARS), \
+ $(if $(filter $(LOCAL_MODULE),$(call word-colon,2,$(pair))), \
+ $(call pretty-error,Modules in PRODUCT_BOOT_JARS must be defined in Android.bp files)))
$(built_dex): $(built_dex_intermediate)
@echo Copying: $@