diff --git a/core/base_rules.mk b/core/base_rules.mk index 64e1069b5..fd369f2fa 100644 --- a/core/base_rules.mk +++ b/core/base_rules.mk @@ -389,7 +389,7 @@ $(LOCAL_INTERMEDIATE_TARGETS) : PRIVATE_MODULE:= $(my_register_name) # We name both BUILT and INSTALLED in case # LOCAL_UNINSTALLABLE_MODULE is set. .PHONY: $(my_all_targets) -$(my_all_targets): $(LOCAL_BUILT_MODULE) $(LOCAL_INSTALLED_MODULE) +$(my_all_targets): $(LOCAL_BUILT_MODULE) $(LOCAL_INSTALLED_MODULE) $(LOCAL_ADDITIONAL_CHECKED_MODULE) .PHONY: $(my_register_name) $(my_register_name): $(my_all_targets) @@ -485,6 +485,8 @@ else my_checked_module := $(LOCAL_BUILT_MODULE) endif +my_checked_module += $(LOCAL_ADDITIONAL_CHECKED_MODULE) + # If they request that this module not be checked, then don't. # PLEASE DON'T SET THIS. ANY PLACES THAT SET THIS WITHOUT # GOOD REASON WILL HAVE IT REMOVED. diff --git a/core/clear_vars.mk b/core/clear_vars.mk index 76ca03058..0f1a937ed 100644 --- a/core/clear_vars.mk +++ b/core/clear_vars.mk @@ -10,6 +10,7 @@ LOCAL_AAPT_FLAGS:= LOCAL_AAPT_INCLUDE_ALL_RESOURCES:= LOCAL_AAPT_NAMESPACES:= LOCAL_ADDITIONAL_CERTIFICATES:= +LOCAL_ADDITIONAL_CHECKED_MODULE:= LOCAL_ADDITIONAL_DEPENDENCIES:= LOCAL_ADDITIONAL_HTML_DIR:= LOCAL_ADDITIONAL_JAVA_DIR:= diff --git a/core/soong_app_prebuilt.mk b/core/soong_app_prebuilt.mk index 1fd6316b8..1e93cee35 100644 --- a/core/soong_app_prebuilt.mk +++ b/core/soong_app_prebuilt.mk @@ -19,14 +19,16 @@ endif LOCAL_MODULE_SUFFIX := .apk LOCAL_BUILT_MODULE_STEM := package.apk -####################################### -include $(BUILD_SYSTEM)/base_rules.mk -####################################### +intermediates.COMMON := $(call local-intermediates-dir,COMMON) full_classes_jar := $(intermediates.COMMON)/classes.jar full_classes_pre_proguard_jar := $(intermediates.COMMON)/classes-pre-proguard.jar full_classes_header_jar := $(intermediates.COMMON)/classes-header.jar +####################################### +include $(BUILD_SYSTEM)/base_rules.mk +####################################### + ifdef LOCAL_SOONG_CLASSES_JAR $(eval $(call copy-one-file,$(LOCAL_SOONG_CLASSES_JAR),$(full_classes_jar))) $(eval $(call copy-one-file,$(LOCAL_SOONG_CLASSES_JAR),$(full_classes_pre_proguard_jar))) diff --git a/core/soong_java_prebuilt.mk b/core/soong_java_prebuilt.mk index 66410e155..08d545d94 100644 --- a/core/soong_java_prebuilt.mk +++ b/core/soong_java_prebuilt.mk @@ -13,9 +13,7 @@ endif LOCAL_MODULE_SUFFIX := .jar LOCAL_BUILT_MODULE_STEM := javalib.jar -####################################### -include $(BUILD_SYSTEM)/base_rules.mk -####################################### +intermediates.COMMON := $(call local-intermediates-dir,COMMON) full_classes_jar := $(intermediates.COMMON)/classes.jar full_classes_pre_proguard_jar := $(intermediates.COMMON)/classes-pre-proguard.jar @@ -24,6 +22,14 @@ common_javalib.jar := $(intermediates.COMMON)/javalib.jar hiddenapi_flags_csv := $(intermediates.COMMON)/hiddenapi/flags.csv hiddenapi_metadata_csv := $(intermediates.COMMON)/hiddenapi/greylist.csv +ifdef LOCAL_SOONG_AAR + LOCAL_ADDITIONAL_CHECKED_MODULE += $(LOCAL_SOONG_AAR) +endif + +####################################### +include $(BUILD_SYSTEM)/base_rules.mk +####################################### + ifdef LOCAL_SOONG_CLASSES_JAR $(eval $(call copy-one-file,$(LOCAL_SOONG_CLASSES_JAR),$(full_classes_jar))) $(eval $(call copy-one-file,$(LOCAL_SOONG_CLASSES_JAR),$(full_classes_pre_proguard_jar)))