forked from openkylin/platform_build
Ensure that the R8 minification map (ProGuard dictionary) file exists
R8 no longer outputs an empty map file when minification (obfuscation) is turned off. Test: m -j PRODUCT-aosp_x86-eng Change-Id: I3bd3f2900225dca05a972f46a3b882041e17ba49
This commit is contained in:
parent
ebe17177fe
commit
b22934382f
|
@ -2915,12 +2915,14 @@ endef
|
||||||
###########################################################
|
###########################################################
|
||||||
define transform-jar-to-dex-r8
|
define transform-jar-to-dex-r8
|
||||||
@echo R8: $@
|
@echo R8: $@
|
||||||
|
$(hide) rm -f $(PRIVATE_PROGUARD_DICTIONARY)
|
||||||
$(hide) $(R8_COMPAT_PROGUARD) -injars '$<' \
|
$(hide) $(R8_COMPAT_PROGUARD) -injars '$<' \
|
||||||
--min-api $(PRIVATE_MIN_SDK_VERSION) \
|
--min-api $(PRIVATE_MIN_SDK_VERSION) \
|
||||||
--force-proguard-compatibility --output $(subst classes.dex,,$@) \
|
--force-proguard-compatibility --output $(subst classes.dex,,$@) \
|
||||||
$(PRIVATE_PROGUARD_FLAGS) \
|
$(PRIVATE_PROGUARD_FLAGS) \
|
||||||
$(addprefix -injars , $(PRIVATE_EXTRA_INPUT_JAR)) \
|
$(addprefix -injars , $(PRIVATE_EXTRA_INPUT_JAR)) \
|
||||||
$(PRIVATE_DX_FLAGS)
|
$(PRIVATE_DX_FLAGS)
|
||||||
|
$(hide) touch $(PRIVATE_PROGUARD_DICTIONARY)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
###########################################################
|
###########################################################
|
||||||
|
|
|
@ -489,6 +489,7 @@ $(built_dex_intermediate): PRIVATE_DX_FLAGS := $(LOCAL_DX_FLAGS)
|
||||||
ifdef LOCAL_PROGUARD_ENABLED
|
ifdef LOCAL_PROGUARD_ENABLED
|
||||||
$(built_dex_intermediate): PRIVATE_EXTRA_INPUT_JAR := $(extra_input_jar)
|
$(built_dex_intermediate): PRIVATE_EXTRA_INPUT_JAR := $(extra_input_jar)
|
||||||
$(built_dex_intermediate): PRIVATE_PROGUARD_FLAGS := $(legacy_proguard_flags) $(common_proguard_flags) $(LOCAL_PROGUARD_FLAGS)
|
$(built_dex_intermediate): PRIVATE_PROGUARD_FLAGS := $(legacy_proguard_flags) $(common_proguard_flags) $(LOCAL_PROGUARD_FLAGS)
|
||||||
|
$(built_dex_intermediate): PRIVATE_PROGUARD_DICTIONARY := $(proguard_dictionary)
|
||||||
$(built_dex_intermediate) : $(full_classes_pre_proguard_jar) $(extra_input_jar) $(my_proguard_sdk_raise) $(common_proguard_flag_files) $(proguard_flag_files) $(legacy_proguard_lib_deps) $(R8_COMPAT_PROGUARD)
|
$(built_dex_intermediate) : $(full_classes_pre_proguard_jar) $(extra_input_jar) $(my_proguard_sdk_raise) $(common_proguard_flag_files) $(proguard_flag_files) $(legacy_proguard_lib_deps) $(R8_COMPAT_PROGUARD)
|
||||||
$(transform-jar-to-dex-r8)
|
$(transform-jar-to-dex-r8)
|
||||||
else # !LOCAL_PROGUARD_ENABLED
|
else # !LOCAL_PROGUARD_ENABLED
|
||||||
|
|
Loading…
Reference in New Issue