From df5d7da7d8c141cf8b919c3c9556b99653589477 Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Thu, 8 Feb 2018 15:29:39 -0800 Subject: [PATCH] Propagate proguard rules from LOCAL_STATIC_ANDROID_LIBRARIES Packages would use proguard rules from their LOCAL_STATIC_ANDROID_LIBRARIES, but other libraries wouldn't propagate the rules from their LOCAL_STATIC_ANDROID_LIBRARIES. Bug: 72969557 Test: m Change-Id: I514af02627d78c48cf6cd08d4b3c17911c6bac2f --- core/static_java_library.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/static_java_library.mk b/core/static_java_library.mk index c1478f10d..6ea5551ae 100644 --- a/core/static_java_library.mk +++ b/core/static_java_library.mk @@ -119,10 +119,13 @@ endif endif ifdef LOCAL_USE_AAPT2 -$(intermediates.COMMON)/export_proguard_flags: $(addprefix $(LOCAL_PATH)/,$(LOCAL_EXPORT_PROGUARD_FLAG_FILES)) +import_proguard_flag_files := $(strip $(foreach l,$(LOCAL_STATIC_ANDROID_LIBRARIES),\ + $(call intermediates-dir-for,JAVA_LIBRARIES,$(l),,COMMON)/export_proguard_flags)) +$(intermediates.COMMON)/export_proguard_flags: $(import_proguard_flag_files) $(addprefix $(LOCAL_PATH)/,$(LOCAL_EXPORT_PROGUARD_FLAG_FILES)) @echo "Export proguard flags: $@" rm -f $@ cat $+ >$@ +import_proguard_flag_files := endif # add --non-constant-id to prevent inlining constants.