Package jacoco and proguard files out of a PACKAGING directory

Package jacoco-report-classes.jar, proguard_usage.zip and
proguard_dictionary out of directories in $OUT/obj/PACKAGING
so that they get cleared by m installclean.  This will make
incremental builds that package these files accurate as long
as installclean was run, which is much faster than a full clean
build.

Bug: 184583915
Test: m TARGET_BUILD_APPS=DeskClock EMMA_INSTRUMENT=true dist
Change-Id: I60c6a0fec1fbce26eab8d5adab25a2231b48e251
This commit is contained in:
Colin Cross
2021-04-06 18:04:06 -07:00
parent 25444470db
commit 330b1fef31
6 changed files with 97 additions and 23 deletions

View File

@@ -470,6 +470,17 @@ endif
ifneq ($(filter obfuscation,$(LOCAL_PROGUARD_ENABLED)),)
$(built_dex_intermediate): .KATI_IMPLICIT_OUTPUTS := $(proguard_dictionary) $(proguard_configuration)
# Make a rule to copy the proguard_dictionary to a packaging directory.
$(eval $(call copy-one-file,$(proguard_dictionary),\
$(call local-packaging-dir,proguard_dictionary)/proguard_dictionary))
$(call add-dependency,$(LOCAL_BUILT_MODULE),\
$(call local-packaging-dir,proguard_dictionary)/proguard_dictionary)
$(eval $(call copy-one-file,$(full_classes_pre_proguard_jar),\
$(call local-packaging-dir,proguard_dictionary)/classes.jar))
$(call add-dependency,$(LOCAL_BUILT_MODULE),\
$(call local-packaging-dir,proguard_dictionary)/classes.jar)
endif
endif # LOCAL_PROGUARD_ENABLED defined