Fix dependency on Soong jacoco report classes
The dependency on the Soong jacoco report classes was mistakenly
using $(common_javalib.jar) which was never set, so was using
the value from the last module. Use $(LOCAL_BUILT_MODULE)
instead.
Test: m checkbuild
Change-Id: If502d67f9e5e0c107de44e96cbf232406c027e44
diff --git a/core/soong_app_prebuilt.mk b/core/soong_app_prebuilt.mk
index 633ef0c..0059e51 100644
--- a/core/soong_app_prebuilt.mk
+++ b/core/soong_app_prebuilt.mk
@@ -13,13 +13,6 @@
include $(BUILD_SYSTEM)/base_rules.mk
#######################################
-ifdef LOCAL_SOONG_JACOCO_REPORT_CLASSES_JAR
- $(eval $(call copy-one-file,$(LOCAL_SOONG_JACOCO_REPORT_CLASSES_JAR),\
- $(intermediates.COMMON)/jacoco-report-classes.jar))
- $(call add-dependency,$(common_javalib.jar),\
- $(intermediates.COMMON)/jacoco-report-classes.jar)
-endif
-
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
@@ -27,6 +20,13 @@
$(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)))
+ifdef LOCAL_SOONG_JACOCO_REPORT_CLASSES_JAR
+ $(eval $(call copy-one-file,$(LOCAL_SOONG_JACOCO_REPORT_CLASSES_JAR),\
+ $(intermediates.COMMON)/jacoco-report-classes.jar))
+ $(call add-dependency,$(LOCAL_BUILT_MODULE),\
+ $(intermediates.COMMON)/jacoco-report-classes.jar)
+endif
+
ifneq ($(TURBINE_DISABLED),false)
ifdef LOCAL_SOONG_HEADER_JAR
$(eval $(call copy-one-file,$(LOCAL_SOONG_HEADER_JAR),$(full_classes_header_jar)))