From ad6674cd6003b78ef8ba101eb8a6b3c889ae4b0d Mon Sep 17 00:00:00 2001 From: Ying Wang Date: Tue, 7 Jan 2014 14:31:49 -0800 Subject: [PATCH] PRODUCT_BOOT_JARS as a list of jar names separated by space This makes it easier for OEMs to extend the PRODUCT_BOOT_JARS in their product configuration files. Change-Id: I5feca2f808b1914c275f28c7a4c38cca2ba6851f --- core/dex_preopt.mk | 4 ++-- core/product_config.mk | 2 +- target/product/core_base.mk | 19 +++++++++++++++++-- target/product/core_minimal.mk | 15 ++++++++++++++- 4 files changed, 34 insertions(+), 6 deletions(-) diff --git a/core/dex_preopt.mk b/core/dex_preopt.mk index c9530c29a..160f128f3 100644 --- a/core/dex_preopt.mk +++ b/core/dex_preopt.mk @@ -8,8 +8,8 @@ $(error No value for DALVIK_VM_LIB) endif # list of boot classpath jars for dexpreopt -DEXPREOPT_BOOT_JARS := $(PRODUCT_BOOT_JARS) -DEXPREOPT_BOOT_JARS_MODULES := $(subst :, ,$(DEXPREOPT_BOOT_JARS)) +DEXPREOPT_BOOT_JARS := $(subst $(space),:,$(PRODUCT_BOOT_JARS)) +DEXPREOPT_BOOT_JARS_MODULES := $(PRODUCT_BOOT_JARS) PRODUCT_BOOTCLASSPATH := $(subst $(space),:,$(foreach m,$(DEXPREOPT_BOOT_JARS_MODULES),/system/framework/$(m).jar)) DEXPREOPT_BUILD_DIR := $(OUT_DIR) diff --git a/core/product_config.mk b/core/product_config.mk index a2be30b29..0574c66fd 100644 --- a/core/product_config.mk +++ b/core/product_config.mk @@ -280,7 +280,7 @@ endif ############################################################################# # A list of module names of BOOTCLASSPATH (jar files) -PRODUCT_BOOT_JARS := $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_BOOT_JARS) +PRODUCT_BOOT_JARS := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_BOOT_JARS)) # Find the device that this product maps to. TARGET_DEVICE := $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_DEVICE) diff --git a/target/product/core_base.mk b/target/product/core_base.mk index cde2b8589..658e5025b 100644 --- a/target/product/core_base.mk +++ b/target/product/core_base.mk @@ -67,5 +67,20 @@ PRODUCT_PACKAGES += \ voip-common $(call inherit-product, $(SRC_TARGET_DIR)/product/core_minimal.mk) -# Override the PRODUCT_BOOT_JARS set in core_minimal.mk -PRODUCT_BOOT_JARS := core:conscrypt:okhttp:core-junit:bouncycastle:ext:framework:framework2:telephony-common:voip-common:mms-common:android.policy:services:apache-xml:webviewchromium +# Override the PRODUCT_BOOT_JARS set in core_minimal.mk. The order matters. +PRODUCT_BOOT_JARS := \ + core \ + conscrypt \ + okhttp \ + core-junit \ + bouncycastle \ + ext \ + framework \ + framework2 \ + telephony-common \ + voip-common \ + mms-common \ + android.policy \ + services \ + apache-xml \ + webviewchromium diff --git a/target/product/core_minimal.mk b/target/product/core_minimal.mk index 159e7b238..21a6e8b93 100644 --- a/target/product/core_minimal.mk +++ b/target/product/core_minimal.mk @@ -57,7 +57,20 @@ PRODUCT_PACKAGES += \ sensorservice \ uiautomator -PRODUCT_BOOT_JARS := core:conscrypt:okhttp:core-junit:bouncycastle:ext:framework:framework2:android.policy:services:apache-xml:webviewchromium +# The order of PRODUCT_BOOT_JARS matters. +PRODUCT_BOOT_JARS := \ + core \ + conscrypt \ + okhttp \ + core-junit \ + bouncycastle \ + ext \ + framework \ + framework2 \ + android.policy \ + services \ + apache-xml \ + webviewchromium PRODUCT_RUNTIMES := runtime_libdvm_default PRODUCT_RUNTIMES += runtime_libart