Merge "core: Move core.oat bootjar definitions into envsetup.mk" into oc-dev-plus-aosp
am: caa917ae3d
Change-Id: I312c7e60ef87dc2f400c992754e4093edfe300ee
diff --git a/core/envsetup.mk b/core/envsetup.mk
index 43593e6..27cfd7f 100644
--- a/core/envsetup.mk
+++ b/core/envsetup.mk
@@ -190,6 +190,13 @@
TARGET_COPY_OUT_VENDOR := $(_vendor_path_placeholder)
###########################################
+#################################################################
+# Set up minimal BOOTCLASSPATH list of jars to build/execute
+# java code with dalvikvm/art.
+TARGET_CORE_JARS := core-oj core-libart conscrypt okhttp bouncycastle apache-xml
+HOST_CORE_JARS := $(addsuffix -hostdex,$(TARGET_CORE_JARS))
+#################################################################
+
# Read the product specs so we can get TARGET_DEVICE and other
# variables that we need in order to locate the output files.
include $(BUILD_SYSTEM)/product_config.mk
diff --git a/target/product/core_minimal.mk b/target/product/core_minimal.mk
index 5a18c70..e521cc3 100644
--- a/target/product/core_minimal.mk
+++ b/target/product/core_minimal.mk
@@ -98,20 +98,19 @@
frameworks/native/data/etc/android.software.preview_sdk.xml:system/etc/permissions/android.software.preview_sdk.xml
endif
+ifeq ($(TARGET_CORE_JARS),)
+$(error TARGET_CORE_JARS is empty; cannot initialize PRODUCT_BOOT_JARS variable)
+endif
+
# The order of PRODUCT_BOOT_JARS matters.
PRODUCT_BOOT_JARS := \
- core-oj \
- core-libart \
- conscrypt \
- okhttp \
+ $(TARGET_CORE_JARS) \
legacy-test \
- bouncycastle \
ext \
framework \
telephony-common \
voip-common \
ims-common \
- apache-xml \
org.apache.http.legacy.boot \
android.hidl.base-V1.0-java \
android.hidl.manager-V1.0-java
diff --git a/target/product/core_tiny.mk b/target/product/core_tiny.mk
index e9920f2..5ced1a6 100644
--- a/target/product/core_tiny.mk
+++ b/target/product/core_tiny.mk
@@ -85,20 +85,19 @@
logd \
wifi-service
+ifeq ($(TARGET_CORE_JARS),)
+$(error TARGET_CORE_JARS is empty; cannot initialize PRODUCT_BOOT_JARS variable)
+endif
+
# The order matters
PRODUCT_BOOT_JARS := \
- core-oj \
- core-libart \
- conscrypt \
- okhttp \
+ $(TARGET_CORE_JARS) \
legacy-test \
- bouncycastle \
ext \
framework \
telephony-common \
voip-common \
ims-common \
- apache-xml \
nullwebview \
org.apache.http.legacy.boot \
android.hidl.base-V1.0-java \
diff --git a/target/product/runtime_libart.mk b/target/product/runtime_libart.mk
index 0755bf3..c1b5c64 100644
--- a/target/product/runtime_libart.mk
+++ b/target/product/runtime_libart.mk
@@ -16,15 +16,14 @@
# Provides a functioning ART environment without Android frameworks
+ifeq ($(TARGET_CORE_JARS),)
+$(error TARGET_CORE_JARS is empty; cannot update PRODUCT_PACKAGES variable)
+endif
+
# Minimal boot classpath. This should be a subset of PRODUCT_BOOT_JARS, and equivalent to
# TARGET_CORE_JARS.
PRODUCT_PACKAGES += \
- apache-xml \
- bouncycastle \
- core-oj \
- core-libart \
- conscrypt \
- okhttp \
+ $(TARGET_CORE_JARS)
# Additional mixins to the boot classpath.
PRODUCT_PACKAGES += \