diff --git a/core/clear_vars.mk b/core/clear_vars.mk index d9ef17161..59297eae8 100644 --- a/core/clear_vars.mk +++ b/core/clear_vars.mk @@ -231,6 +231,9 @@ LOCAL_SDK_RES_VERSION:= LOCAL_SDK_VERSION:= LOCAL_SHARED_ANDROID_LIBRARIES:= LOCAL_SHARED_LIBRARIES:= +LOCAL_SOONG_HEADER_JAR := +LOCAL_SOONG_DEX_JAR := +LOCAL_SOONG_JACOCO_REPORT_CLASSES_JAR := # '',true LOCAL_SOURCE_FILES_ALL_GENERATED:= LOCAL_SRC_FILES:= diff --git a/core/config.mk b/core/config.mk index 7ff2922b7..e6570dd16 100644 --- a/core/config.mk +++ b/core/config.mk @@ -659,7 +659,6 @@ RELOCATION_PACKER := prebuilts/misc/$(BUILD_OS)-$(HOST_PREBUILT_ARCH)/relocation FINDBUGS_DIR := external/owasp/sanitizer/tools/findbugs/bin FINDBUGS := $(FINDBUGS_DIR)/findbugs -JACOCO_CLI_JAR := $(HOST_OUT_JAVA_LIBRARIES)/jacoco-cli$(COMMON_JAVA_PACKAGE_SUFFIX) # Tool to merge AndroidManifest.xmls ANDROID_MANIFEST_MERGER_CLASSPATH := \ diff --git a/core/jacoco.mk b/core/jacoco.mk index 74d84f44d..f51790d64 100644 --- a/core/jacoco.mk +++ b/core/jacoco.mk @@ -21,7 +21,6 @@ # determine Jacoco include/exclude filters even when coverage is not enabled # to get syntax checking on LOCAL_JACK_COVERAGE_(INCLUDE|EXCLUDE)_FILTER -DEFAULT_JACOCO_EXCLUDE_FILTER := org/junit/*,org/jacoco/*,org/mockito/* # copy filters from Jack but also skip some known java packages my_include_filter := $(strip $(LOCAL_JACK_COVERAGE_INCLUDE_FILTER)) my_exclude_filter := $(strip $(DEFAULT_JACOCO_EXCLUDE_FILTER),$(LOCAL_JACK_COVERAGE_EXCLUDE_FILTER)) diff --git a/core/soong_java_prebuilt.mk b/core/soong_java_prebuilt.mk index 53ad50dda..ccbe745d0 100644 --- a/core/soong_java_prebuilt.mk +++ b/core/soong_java_prebuilt.mk @@ -2,6 +2,7 @@ # Extra inputs: # LOCAL_SOONG_HEADER_JAR # LOCAL_SOONG_DEX_JAR +# LOCAL_SOONG_JACOCO_REPORT_CLASSES_JAR ifneq ($(LOCAL_MODULE_MAKEFILE),$(SOONG_ANDROID_MK)) $(call pretty-error,soong_java_prebuilt.mk may only be used from Soong) @@ -18,13 +19,12 @@ full_classes_jar := $(intermediates.COMMON)/classes.jar full_classes_header_jar := $(intermediates.COMMON)/classes-header.jar common_javalib.jar := $(intermediates.COMMON)/javalib.jar -LOCAL_FULL_CLASSES_PRE_JACOCO_JAR := $(LOCAL_PREBUILT_MODULE_FILE) +$(eval $(call copy-one-file,$(LOCAL_PREBUILT_MODULE_FILE),$(full_classes_jar))) -####################################### -include $(BUILD_SYSTEM)/jacoco.mk -####################################### - -$(eval $(call copy-one-file,$(LOCAL_FULL_CLASSES_JACOCO_JAR),$(full_classes_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)) +endif ifneq ($(TURBINE_DISABLED),false) ifdef LOCAL_SOONG_HEADER_JAR @@ -94,7 +94,3 @@ my_2nd_arch_prefix := $(LOCAL_2ND_ARCH_VAR_PREFIX) my_common := COMMON include $(BUILD_SYSTEM)/link_type.mk endif # !LOCAL_IS_HOST_MODULE - -# Built in equivalent to include $(CLEAR_VARS) -LOCAL_SOONG_HEADER_JAR := -LOCAL_SOONG_DEX_JAR :=