From 245592908c5be4c841ce7a93cf0c8e9e6a8e5965 Mon Sep 17 00:00:00 2001 From: Ying Wang Date: Mon, 27 Aug 2012 16:01:38 -0700 Subject: [PATCH] Keep the emma classes if emma is enabled. Change-Id: Ie551d48532c61bf610b12875dc33cfe476625c5e --- core/java.mk | 3 +++ core/proguard.emma.flags | 4 ++++ 2 files changed, 7 insertions(+) create mode 100644 core/proguard.emma.flags diff --git a/core/java.mk b/core/java.mk index 9e47dc31f..0fccbd36c 100644 --- a/core/java.mk +++ b/core/java.mk @@ -322,6 +322,9 @@ proguard_flags := $(addprefix -libraryjars ,$(proguard_full_java_libs)) \ -include $(BUILD_SYSTEM)/proguard.flags \ -forceprocessing \ -printmapping $(proguard_dictionary) +ifeq ($(LOCAL_EMMA_INSTRUMENT),true) +proguard_flags += -include $(BUILD_SYSTEM)/proguard.emma.flags +endif # If this is a test package, add proguard keep flags for tests. ifneq ($(strip $(LOCAL_INSTRUMENTATION_FOR)$(filter tests,$(LOCAL_MODULE_TAGS))$(filter android.test.runner,$(LOCAL_JAVA_LIBRARIES))),) proguard_flags := $(proguard_flags) -include $(BUILD_SYSTEM)/proguard_tests.flags diff --git a/core/proguard.emma.flags b/core/proguard.emma.flags new file mode 100644 index 000000000..bf9408621 --- /dev/null +++ b/core/proguard.emma.flags @@ -0,0 +1,4 @@ +# Keep everything for the emma classes +-keep class com.vladium.** { + *; +}