summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYohann Roussel <yroussel@google.com>2018-01-31 11:14:03 +0100
committerYohann Roussel <yroussel@google.com>2018-02-01 14:14:47 +0000
commitbb37367b461ccd6311dfaf1dbb9fa13b7c6c653a (patch)
tree04cdb98d71386c673a6b04d1e1ccf60e21423081
parentdd452a4244dad07c53db525d314fdcf4429ffd46 (diff)
downloaddalvik-bb37367b461ccd6311dfaf1dbb9fa13b7c6c653a.tar.gz
Build shrinkedAndroid.jar from SDK 20 API
SDK 20 API contains all clases worth considering for multidex tracing while the latest API contains extra classes and is also missing some. Also explicitly keep roots in shrinkedAndroid.jar rules. Technically this is not really needed because they are all kept as part of the hierarchy of their subclasses (that were already kept), but better be explicit about the intention. Test: m shrinkedAndroid Change-Id: Ifb5ecb8c2803384f52509010bc5f9c3cb5e1791a
-rw-r--r--dx/Android.mk2
-rw-r--r--dx/shrinkedAndroid.proguard.flags16
2 files changed, 17 insertions, 1 deletions
diff --git a/dx/Android.mk b/dx/Android.mk
index d13e29189..c0e10a12b 100644
--- a/dx/Android.mk
+++ b/dx/Android.mk
@@ -61,7 +61,7 @@ include $(BUILD_SYSTEM)/base_rules.mk
$(LOCAL_BUILT_MODULE): PRIVATE_PROGUARD_FLAGS:= \
-include $(addprefix $(LOCAL_PATH)/, shrinkedAndroid.proguard.flags)
-$(LOCAL_BUILT_MODULE): $(call java-lib-files,android_stubs_current) \
+$(LOCAL_BUILT_MODULE): $(call java-lib-files,sdk_v20) \
$(addprefix $(LOCAL_PATH)/, shrinkedAndroid.proguard.flags)| $(PROGUARD)
@echo Proguard: $@
$(hide) $(PROGUARD) -injars "$<(**/*.class)" -outjars $@ $(PRIVATE_PROGUARD_FLAGS)
diff --git a/dx/shrinkedAndroid.proguard.flags b/dx/shrinkedAndroid.proguard.flags
index c22ec926c..d248a4a50 100644
--- a/dx/shrinkedAndroid.proguard.flags
+++ b/dx/shrinkedAndroid.proguard.flags
@@ -5,20 +5,36 @@
-dontpreverify
-keep public class * extends android.app.Instrumentation {
}
+-keep public class android.app.Instrumentation {
+}
-keep public class * extends android.app.Application {
}
+-keep public class android.app.Application {
+}
-keep public class * extends android.app.Activity {
}
+-keep public class android.app.Activity {
+}
-keep public class * extends android.app.Service {
}
+-keep public class android.app.Service {
+}
-keep public class * extends android.content.ContentProvider {
}
+-keep public class android.content.ContentProvider {
+}
-keep public class * extends android.content.BroadcastReceiver {
}
+-keep public class android.content.BroadcastReceiver {
+}
-keep public class * extends android.app.backup.BackupAgent {
}
+-keep public class android.app.backup.BackupAgent {
+}
-keep public class java.lang.annotation.Annotation {
}
-keep public class * extends android.test.InstrumentationTestCase {
}
+-keep public class android.test.InstrumentationTestCase {
+}