From 9fbdd9ec5a6a178519cbf82bf6ca2bcde4a54a31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Gjesse?= Date: Fri, 13 Apr 2018 15:34:20 +0200 Subject: [PATCH] Keep the collected Proguard configuration This will work for both R8 and Proguard Test: m -j Settings && "manually check .../proguard_coniguration file" Change-Id: I1da7c3426b3511e2d5ad69852da8cec3245d7e54 --- core/java.mk | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/java.mk b/core/java.mk index dab531479..0361c834f 100644 --- a/core/java.mk +++ b/core/java.mk @@ -404,6 +404,7 @@ ifneq ($(filter-out full custom obfuscation optimization,$(LOCAL_PROGUARD_ENABLE $(error invalid value for LOCAL_PROGUARD_ENABLED: $(LOCAL_PROGUARD_ENABLED)) endif proguard_dictionary := $(intermediates.COMMON)/proguard_dictionary +proguard_configuration := $(intermediates.COMMON)/proguard_configuration # When an app contains references to APIs that are not in the SDK specified by # its LOCAL_SDK_VERSION for example added by support library or by runtime @@ -434,6 +435,7 @@ legacy_proguard_lib_deps := $(my_proguard_sdk_raise) \ $(filter-out $(my_proguard_sdk_raise),$(full_shared_java_header_libs)) legacy_proguard_flags += -printmapping $(proguard_dictionary) +legacy_proguard_flags += -printconfiguration $(proguard_configuration) common_proguard_flags := -forceprocessing @@ -516,9 +518,9 @@ endif ifneq ($(filter obfuscation,$(LOCAL_PROGUARD_ENABLED)),) ifneq ($(LOCAL_USE_R8),true) - $(full_classes_proguard_jar): .KATI_IMPLICIT_OUTPUTS := $(proguard_dictionary) + $(full_classes_proguard_jar): .KATI_IMPLICIT_OUTPUTS := $(proguard_dictionary) $(proguard_configuration) else - $(built_dex_intermediate): .KATI_IMPLICIT_OUTPUTS := $(proguard_dictionary) + $(built_dex_intermediate): .KATI_IMPLICIT_OUTPUTS := $(proguard_dictionary) $(proguard_configuration) endif endif