aboutsummaryrefslogtreecommitdiffstats
path: root/core/tasks
diff options
context:
space:
mode:
authorJiyong Park <jiyong@google.com>2020-01-06 13:25:22 +0900
committerAnton Hansson <hansson@google.com>2020-01-10 15:15:47 +0000
commitee758131624170b9083a324de53c4afd79320531 (patch)
treea0b94e192113c0abff79a63e4507f68cc684eab1 /core/tasks
parentc30b734f427915ecc92677017b71d6e005d806bf (diff)
downloadplatform_build-ee758131624170b9083a324de53c4afd79320531.tar.gz
platform_build-ee758131624170b9083a324de53c4afd79320531.tar.bz2
platform_build-ee758131624170b9083a324de53c4afd79320531.zip
Correctly gather boot jars from APEXes
Jars in APEXes have Make module names <jar_name>.<apex_name>. e.g. updatable-apex.com.android.media. Previously, we have used <jar_name> which actually meant the platform variant of the jar. This is not only incorrect, but also is causing problem as the platform variant is no longer available when the jar is configured to be available only for the corresponding APEX (via the apex_available property). Fixing the problem by correctly using <jar_name>.<apex_name> scheme. Bug: N/A Test: m Change-Id: I6e255ce88c9bd80120b29197fb2637a64010f531 Merged-In: I6e255ce88c9bd80120b29197fb2637a64010f531
Diffstat (limited to 'core/tasks')
-rw-r--r--core/tasks/boot_jars_package_check.mk21
1 files changed, 17 insertions, 4 deletions
diff --git a/core/tasks/boot_jars_package_check.mk b/core/tasks/boot_jars_package_check.mk
index ba383f514b..ceaff54b8d 100644
--- a/core/tasks/boot_jars_package_check.mk
+++ b/core/tasks/boot_jars_package_check.mk
@@ -22,10 +22,23 @@ ifdef PRODUCT_BOOT_JARS
intermediates := $(call intermediates-dir-for, PACKAGING, boot-jars-package-check,,COMMON)
stamp := $(intermediates)/stamp
-art_boot_jars := $(addsuffix .com.android.art.release,$(filter $(ART_APEX_JARS), $(PRODUCT_BOOT_JARS)))
-conscrypt_boot_jars := $(addsuffix .com.android.conscrypt,$(filter conscrypt, $(PRODUCT_BOOT_JARS)))
-noncore_boot_jars := $(filter-out $(ART_APEX_JARS) conscrypt, $(PRODUCT_BOOT_JARS))
-built_boot_jars := $(foreach j, $(art_boot_jars) $(conscrypt_boot_jars) $(noncore_boot_jars), \
+
+# The actual names for the updatable jars are <jar_name>.<apex_name> e.g., updatable-media.com.android.media
+updatable_boot_jars := $(foreach pair,$(PRODUCT_UPDATABLE_BOOT_JARS),\
+ $(eval apex := $(call word-colon,1,$(pair)))\
+ $(eval jar := $(call word-colon,2,$(pair)))\
+ $(jar).$(apex)\
+)
+#TODO(jiyong) merge art_boot_jars into updatable_boot_jars
+art_boot_jars := $(addsuffix .com.android.art.release,$(filter $(ART_APEX_JARS),$(PRODUCT_BOOT_JARS)))
+
+platform_boot_jars := $(filter-out \
+ $(ART_APEX_JARS)\
+ $(foreach pair,$(PRODUCT_UPDATABLE_BOOT_JARS),$(call word-colon,2,$(pair))),\
+ $(PRODUCT_BOOT_JARS)\
+)
+
+built_boot_jars := $(foreach j, $(updatable_boot_jars) $(art_boot_jars) $(platform_boot_jars), \
$(call intermediates-dir-for, JAVA_LIBRARIES, $(j),,COMMON)/classes.jar)
script := build/make/core/tasks/check_boot_jars/check_boot_jars.py
whitelist_file := build/make/core/tasks/check_boot_jars/package_whitelist.txt