From ae9115a525260a0ca317eadd13f075def733a66d Mon Sep 17 00:00:00 2001 From: Ying Wang Date: Thu, 22 Aug 2013 20:52:47 -0700 Subject: [PATCH] Collect and store proguard obfuscation dictionary files. Collect and store proguard obfuscation dictionary files. Only do this for apps_only build for now. Bug: 9407666 Change-Id: I51c78bf0f42f959dc920de230e60e0f71ed0d0ea --- core/Makefile | 18 ++++++++++++++++++ core/main.mk | 3 +++ 2 files changed, 21 insertions(+) diff --git a/core/Makefile b/core/Makefile index 55ab6a512..6c57a4960 100644 --- a/core/Makefile +++ b/core/Makefile @@ -1391,6 +1391,24 @@ $(EMMA_META_ZIP) : endif # EMMA_INSTRUMENT=true +#------------------------------------------------------------------ +# A zip of Proguard obfuscation dictionary files. +# Only for apps_only build. +# +ifdef TARGET_BUILD_APPS +PROGUARD_DICT_ZIP := $(PRODUCT_OUT)/proguard-dict-$(FILE_NAME_TAG).zip +# the dependency will be set up later in build/core/main.mk. +$(PROGUARD_DICT_ZIP) : + @echo "Packaging Proguard obfuscation dictionary files." + $(hide) dict_files=`find $(TARGET_OUT_COMMON_INTERMEDIATES)/APPS -name proguard_dictionary`; \ + if [ -n "$$dict_files" ]; then \ + zip -q $@ $$dict_files; \ + else \ + touch $@; \ + fi + +endif # TARGET_BUILD_APPS + # ----------------------------------------------------------------- # dalvik something .PHONY: dalvikfiles diff --git a/core/main.mk b/core/main.mk index 282d9c3f2..3af430629 100644 --- a/core/main.mk +++ b/core/main.mk @@ -819,6 +819,9 @@ ifneq ($(TARGET_BUILD_APPS),) $(call dist-for-goals,apps_only, $(EMMA_META_ZIP)) endif + $(PROGUARD_DICT_ZIP) : $(apps_only_installed_files) + $(call dist-for-goals,apps_only, $(PROGUARD_DICT_ZIP)) + .PHONY: apps_only apps_only: $(unbundled_build_modules)