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
This commit is contained in:
Colin Cross 2017-12-22 16:51:23 -08:00
parent 9c2b798143
commit 96873482b0

View file

@ -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))