diff --git a/core/java.mk b/core/java.mk index 6e9fea041..04f7a72d0 100644 --- a/core/java.mk +++ b/core/java.mk @@ -558,6 +558,12 @@ endif $(eval $(call copy-one-file,$(full_classes_jarjar_jar),$(full_classes_jar))) +LOCAL_FULL_CLASSES_PRE_JACOCO_JAR := $(full_classes_jar) + +####################################### +include $(BUILD_SYSTEM)/jacoco.mk +####################################### + # Temporarily enable --multi-dex until proguard supports v53 class files # ( http://b/67673860 ) or we move away from proguard altogether. ifdef TARGET_OPENJDK9 @@ -569,7 +575,7 @@ my_desugaring := ifndef LOCAL_IS_STATIC_JAVA_LIBRARY my_desugaring := true $(full_classes_desugar_jar): PRIVATE_DX_FLAGS := $(LOCAL_DX_FLAGS) -$(full_classes_desugar_jar): $(full_classes_jar) $(full_java_header_libs) $(DESUGAR) +$(full_classes_desugar_jar): $(LOCAL_FULL_CLASSES_JACOCO_JAR) $(full_java_header_libs) $(DESUGAR) $(desugar-classes-jar) endif else @@ -577,16 +583,10 @@ my_desugaring := endif ifndef my_desugaring -full_classes_desugar_jar := $(full_classes_jar) +full_classes_desugar_jar := $(LOCAL_FULL_CLASSES_JACOCO_JAR) endif -LOCAL_FULL_CLASSES_PRE_JACOCO_JAR := $(full_classes_desugar_jar) - -####################################### -include $(BUILD_SYSTEM)/jacoco.mk -####################################### - -full_classes_pre_proguard_jar := $(LOCAL_FULL_CLASSES_JACOCO_JAR) +full_classes_pre_proguard_jar := $(full_classes_desugar_jar) # Keep a copy of the jar just before proguard processing. $(eval $(call copy-one-file,$(full_classes_pre_proguard_jar),$(intermediates.COMMON)/classes-pre-proguard.jar))