Export proguard flags from static android libraries and aar prebuilts

Test: m Contacts, classes-proguard.jar has same contents
Test: rm -rf out; tapas Contacts; m
Change-Id: Id7a92fb2c44913bccbfcbeae127355b4de588e4d
Merged-In: Id7a92fb2c44913bccbfcbeae127355b4de588e4d
(cherry picked from commit 1417c177ac)
This commit is contained in:
Dan Willemsen
2017-11-17 13:11:26 -08:00
committed by Colin Cross
parent 5b82359f85
commit 1d64623105
4 changed files with 22 additions and 0 deletions

View File

@@ -644,6 +644,12 @@ ifeq ($(filter shrinktests,$(LOCAL_PROGUARD_ENABLED)),)
common_proguard_flags += -dontshrink # don't shrink tests by default
endif # shrinktests
endif # test package
ifneq ($(LOCAL_PROGUARD_ENABLED),custom)
ifdef LOCAL_USE_AAPT2
common_proguard_flag_files += $(foreach l,$(LOCAL_STATIC_ANDROID_LIBRARIES),\
$(call intermediates-dir-for,JAVA_LIBRARIES,$(l),,COMMON)/export_proguard_flags)
endif
endif
ifneq ($(common_proguard_flag_files),)
common_proguard_flags += $(addprefix -include , $(common_proguard_flag_files))
# This is included from $(BUILD_SYSTEM)/proguard.flags