summaryrefslogtreecommitdiff
path: root/chromium/proguard.flags
diff options
context:
space:
mode:
authorTorne (Richard Coles) <torne@google.com>2013-05-31 11:52:12 +0100
committerTorne (Richard Coles) <torne@google.com>2013-05-31 11:52:12 +0100
commitc03217fbee001280f4d23fa67f07496c219aeac0 (patch)
tree62956539ac94b2fde97d7a78dc245473c6af8a07 /chromium/proguard.flags
parent53527087680509612ee5d1a5ab34244fd3de368d (diff)
downloadwebview-c03217fbee001280f4d23fa67f07496c219aeac0.tar.gz
Improve proguard configuration.
1) We should explicitly keep the native methods in com.android.webview.chromium as well, since the plat_support library will crash if they are removed. This wasn't actually broken as they were references anyway, but being explicit is better. 2) Using a single "keep" statement for the org.chromium JNI interface causes all classes in that package to be kept even if they don't have JNI members. Instead, we should have a separate "keepclasseswithmembers" for each of the kinds of JNI interface to keep only classes that have at least one of those methods. This allows a few more classes to be removed entirely (along with their constructors) and prunes a small amount of extra code as a result. Change-Id: I7ce4dd7bdca36af49a306838bb567317e5314f4f
Diffstat (limited to 'chromium/proguard.flags')
-rw-r--r--chromium/proguard.flags15
1 files changed, 13 insertions, 2 deletions
diff --git a/chromium/proguard.flags b/chromium/proguard.flags
index eeb2edc..39b1863 100644
--- a/chromium/proguard.flags
+++ b/chromium/proguard.flags
@@ -4,11 +4,22 @@
public *;
}
-# Keep everything related to the JNI interface.
--keep class org.chromium.** {
+# Keep the native methods bound to plat_support.
+-keepclasseswithmembers class com.android.webview.chromium.** {
+ native <methods>;
+}
+
+# Keep everything related to the org.chromium JNI interface.
+-keepclasseswithmembers class org.chromium.** {
@**.AccessedByNative <fields>;
+}
+-keepclasseswithmembers class org.chromium.** {
@**.CalledByNative <methods>;
+}
+-keepclasseswithmembers class org.chromium.** {
@**.CalledByNativeUnchecked <methods>;
+}
+-keepclasseswithmembers class org.chromium.** {
native <methods>;
}