* commit '960d919e814726f05ad1a9b82e6a9677f9977f15': Allow proguarding the main app and the test app in a single run.
This commit is contained in:
commit
2d72094f06
3 changed files with 10 additions and 2 deletions
|
@ -105,6 +105,7 @@ LOCAL_EMMA_INSTRUMENT:=
|
|||
LOCAL_PROGUARD_ENABLED:= # '',full,custom,nosystem,disabled,obfuscation,optimization
|
||||
LOCAL_PROGUARD_FLAGS:=
|
||||
LOCAL_PROGUARD_FLAG_FILES:=
|
||||
LOCAL_TEST_MODULE_TO_PROGUARD_WITH:=
|
||||
LOCAL_EMMA_COVERAGE_FILTER:=
|
||||
LOCAL_WARNINGS_ENABLE:=
|
||||
LOCAL_FULL_MANIFEST_FILE:=
|
||||
|
|
|
@ -1929,7 +1929,8 @@ endif
|
|||
###########################################################
|
||||
define transform-jar-to-proguard
|
||||
@echo Proguard: $@
|
||||
$(hide) $(PROGUARD) -injars $< -outjars $@ $(PRIVATE_PROGUARD_FLAGS)
|
||||
$(hide) $(PROGUARD) -injars $< -outjars $@ $(PRIVATE_PROGUARD_FLAGS) \
|
||||
$(addprefix -injars , $(PRIVATE_EXTRA_INPUT_JAR))
|
||||
endef
|
||||
|
||||
###########################################################
|
||||
|
|
|
@ -435,8 +435,14 @@ endif # LOCAL_PROGUARD_ENABLED is not nosystem
|
|||
proguard_flag_files := $(addprefix $(LOCAL_PATH)/, $(LOCAL_PROGUARD_FLAG_FILES))
|
||||
LOCAL_PROGUARD_FLAGS += $(addprefix -include , $(proguard_flag_files))
|
||||
|
||||
ifdef LOCAL_TEST_MODULE_TO_PROGUARD_WITH
|
||||
extra_input_jar := $(call intermediates-dir-for,APPS,$(LOCAL_TEST_MODULE_TO_PROGUARD_WITH),,COMMON)/classes.jar
|
||||
else
|
||||
extra_input_jar :=
|
||||
endif
|
||||
$(full_classes_proguard_jar): PRIVATE_EXTRA_INPUT_JAR := $(extra_input_jar)
|
||||
$(full_classes_proguard_jar): PRIVATE_PROGUARD_FLAGS := $(proguard_flags) $(LOCAL_PROGUARD_FLAGS)
|
||||
$(full_classes_proguard_jar) : $(full_classes_jar) $(proguard_flag_files) | $(ACP) $(PROGUARD)
|
||||
$(full_classes_proguard_jar) : $(full_classes_jar) $(extra_input_jar) $(proguard_flag_files) | $(ACP) $(PROGUARD)
|
||||
$(call transform-jar-to-proguard)
|
||||
|
||||
else # LOCAL_PROGUARD_ENABLED not defined
|
||||
|
|
Loading…
Reference in a new issue