Set a dedicated variable for the runtime apex libs.
Bug: 124789867
Test: build with coverage, the boot classpath has jacoco.jar in /system/framework, not the apex
Change-Id: I2529f8fcb4ef30454a9e5fc95d58d31bef83ec6f
diff --git a/core/dex_preopt_config.mk b/core/dex_preopt_config.mk
index e3b720b..592e7fb 100644
--- a/core/dex_preopt_config.mk
+++ b/core/dex_preopt_config.mk
@@ -115,7 +115,7 @@
$(call add_json_list, PatternsOnSystemOther, $(SYSTEM_OTHER_ODEX_FILTER))
$(call add_json_bool, DisableGenerateProfile, $(filter false,$(WITH_DEX_PREOPT_GENERATE_PROFILE)))
$(call add_json_list, BootJars, $(PRODUCT_BOOT_JARS))
- $(call add_json_list, TargetCoreJars, $(TARGET_CORE_JARS))
+ $(call add_json_list, RuntimeApexJars, $(RUNTIME_APEX_JARS))
$(call add_json_list, ProductUpdatableBootModules, $(PRODUCT_UPDATABLE_BOOT_MODULES))
$(call add_json_list, ProductUpdatableBootLocations, $(PRODUCT_UPDATABLE_BOOT_LOCATIONS))
$(call add_json_list, SystemServerJars, $(PRODUCT_SYSTEM_SERVER_JARS))
diff --git a/core/envsetup.mk b/core/envsetup.mk
index e62636e..cc427ca 100644
--- a/core/envsetup.mk
+++ b/core/envsetup.mk
@@ -206,7 +206,10 @@
#################################################################
# 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
+# Jars present in the runtime apex. These should match exactly the list of
+# Java libraries in the runtime apex build rule.
+RUNTIME_APEX_JARS := core-oj core-libart okhttp bouncycastle apache-xml
+TARGET_CORE_JARS := $(RUNTIME_APEX_JARS) conscrypt
ifeq ($(EMMA_INSTRUMENT),true)
ifneq ($(EMMA_INSTRUMENT_STATIC),true)
# For instrumented build, if Jacoco is not being included statically