From 96873482b062b8c4d576c221512fb33c24c52548 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Fri, 22 Dec 2017 16:51:23 -0800 Subject: [PATCH] Move jacoco before desugar R8 will replace desugar+proguard+dx, which will mean jacoco has to run before desugar. In preparation, move jacoco before desugar now. Test: m EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true SKIP_BOOT_JARS_CHECK=true WITH_DEXPREOPT=false tests Change-Id: I0627a79ba2f0b26a113d5d8bcc5cb1fda08295a1 --- core/java.mk | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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))