Dist proguard dictionaries for platform builds
Proguard dictionaries are useful for platform builds as well as unbundled builds, produce them for both. Bug: 140585949 Test: m out/target/product/$(get_build_var TARGET_DEVICE)/${TARGET_PRODUCT}-proguard-dict-eng.ccross.zip Change-Id: I63b826be35cfbfc9661b5be7de5bea285bd3d3fc
This commit is contained in:
parent
fdef43d69c
commit
114e8dfa3e
2 changed files with 20 additions and 16 deletions
|
@ -4494,25 +4494,28 @@ endif # EMMA_INSTRUMENT=true
|
||||||
|
|
||||||
#------------------------------------------------------------------
|
#------------------------------------------------------------------
|
||||||
# A zip of Proguard obfuscation dictionary files.
|
# A zip of Proguard obfuscation dictionary files.
|
||||||
# Only for apps_only build.
|
|
||||||
#
|
#
|
||||||
ifdef TARGET_BUILD_APPS
|
|
||||||
PROGUARD_DICT_ZIP := $(PRODUCT_OUT)/$(TARGET_PRODUCT)-proguard-dict-$(FILE_NAME_TAG).zip
|
PROGUARD_DICT_ZIP := $(PRODUCT_OUT)/$(TARGET_PRODUCT)-proguard-dict-$(FILE_NAME_TAG).zip
|
||||||
# the dependency will be set up later in build/make/core/main.mk.
|
# For apps_only build we'll establish the dependency later in build/make/core/main.mk.
|
||||||
$(PROGUARD_DICT_ZIP) :
|
ifndef TARGET_BUILD_APPS
|
||||||
|
$(PROGUARD_DICT_ZIP): \
|
||||||
|
$(INSTALLED_SYSTEMIMAGE_TARGET) \
|
||||||
|
$(INSTALLED_RAMDISK_TARGET) \
|
||||||
|
$(INSTALLED_BOOTIMAGE_TARGET) \
|
||||||
|
$(INSTALLED_USERDATAIMAGE_TARGET) \
|
||||||
|
$(INSTALLED_VENDORIMAGE_TARGET) \
|
||||||
|
$(INSTALLED_PRODUCTIMAGE_TARGET) \
|
||||||
|
$(INSTALLED_SYSTEM_EXTIMAGE_TARGET) \
|
||||||
|
$(INSTALLED_ODMIMAGE_TARGET) \
|
||||||
|
$(updater_dep)
|
||||||
|
endif
|
||||||
|
$(PROGUARD_DICT_ZIP): PRIVATE_LIST_FILE := $(call intermediates-dir-for,PACKAGING,proguard)/filelist
|
||||||
|
$(PROGUARD_DICT_ZIP): $(SOONG_ZIP)
|
||||||
@echo "Packaging Proguard obfuscation dictionary files."
|
@echo "Packaging Proguard obfuscation dictionary files."
|
||||||
$(hide) dict_files=`find $(TARGET_OUT_COMMON_INTERMEDIATES)/APPS -name proguard_dictionary`; \
|
mkdir -p $(dir $@) $(TARGET_OUT_COMMON_INTERMEDIATES)/APPS $(dir $(PRIVATE_LIST_FILE))
|
||||||
if [ -n "$$dict_files" ]; then \
|
find $(TARGET_OUT_COMMON_INTERMEDIATES)/APPS -name proguard_dictionary | \
|
||||||
unobfuscated_jars=$${dict_files//proguard_dictionary/classes.jar}; \
|
sed -e 's/\(.*\)\/proguard_dictionary/\0\n\1\/classes.jar/' > $(PRIVATE_LIST_FILE)
|
||||||
zip -qX $@ $$dict_files $$unobfuscated_jars; \
|
$(SOONG_ZIP) --ignore_missing_files -d -o $@ -C $(OUT_DIR)/.. -l $(PRIVATE_LIST_FILE)
|
||||||
else \
|
|
||||||
touch $(dir $@)/zipdummy; \
|
|
||||||
(cd $(dir $@) && zip -q $(notdir $@) zipdummy); \
|
|
||||||
zip -qd $@ zipdummy; \
|
|
||||||
rm $(dir $@)/zipdummy; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
endif # TARGET_BUILD_APPS
|
|
||||||
|
|
||||||
|
|
||||||
ifeq (true,$(PRODUCT_USE_DYNAMIC_PARTITIONS))
|
ifeq (true,$(PRODUCT_USE_DYNAMIC_PARTITIONS))
|
||||||
|
|
|
@ -1663,6 +1663,7 @@ else # TARGET_BUILD_APPS
|
||||||
$(INTERNAL_OTA_RETROFIT_DYNAMIC_PARTITIONS_PACKAGE_TARGET) \
|
$(INTERNAL_OTA_RETROFIT_DYNAMIC_PARTITIONS_PACKAGE_TARGET) \
|
||||||
$(BUILT_OTATOOLS_PACKAGE) \
|
$(BUILT_OTATOOLS_PACKAGE) \
|
||||||
$(SYMBOLS_ZIP) \
|
$(SYMBOLS_ZIP) \
|
||||||
|
$(PROGUARD_DICT_ZIP) \
|
||||||
$(COVERAGE_ZIP) \
|
$(COVERAGE_ZIP) \
|
||||||
$(APPCOMPAT_ZIP) \
|
$(APPCOMPAT_ZIP) \
|
||||||
$(INSTALLED_FILES_FILE) \
|
$(INSTALLED_FILES_FILE) \
|
||||||
|
|
Loading…
Reference in a new issue