OLD | NEW |
---|---|
1 # Don't rename anything, it makes stack traces unintelligible. We only allow the | 1 # Don't rename anything, it makes stack traces unintelligible. We only allow the |
2 # obfuscation pass to run so that we can discard attributes like local variable | 2 # obfuscation pass to run so that we can discard attributes like local variable |
3 # tables. | 3 # tables. |
4 -keepnames class *** { *; } | 4 -keepnames class *** { *; } |
5 | 5 |
6 # Keep source file and line number information for stack traces. | 6 # Keep source file and line number information for stack traces. |
7 -keepattributes SourceFile,LineNumberTable | 7 -keepattributes SourceFile,LineNumberTable |
8 | 8 |
9 # Keep all runtime visible annotations. | 9 # Keep all runtime visible annotations. |
10 -keepattributes RuntimeVisibleAnnotations | 10 -keepattributes RuntimeVisibleAnnotations |
11 | 11 -keep @interface **.AccessedBy* |
agrieve
2016/07/13 13:42:29
nit: Can you add a comment warning that removing t
| |
12 # Disable optimization as this causes proguard to remove seemingly random stuff, | 12 -keep @interface **.CalledBy* |
13 # including things explicitly kept in this configuration. | 13 -keep @interface **.UsedBy* |
14 -dontoptimize | |
15 | 14 |
16 # Keep the factory and its public members; it's the main entry point used by the | 15 # Keep the factory and its public members; it's the main entry point used by the |
17 # framework. | 16 # framework. |
18 -keep class com.android.webview.chromium.WebViewChromiumFactoryProvider { | 17 -keep class com.android.webview.chromium.WebViewChromiumFactoryProvider { |
19 public *; | 18 public *; |
20 } | 19 } |
21 | 20 |
22 # This is the main entry point for APIs. It is kept to make developing with | 21 # This is the main entry point for APIs. It is kept to make developing with |
23 # unreleased Android easier. | 22 # unreleased Android easier. |
24 -keep class com.android.webview.chromium.WebViewChromium { | 23 -keep class com.android.webview.chromium.WebViewChromium { |
25 public *; | 24 public *; |
26 } | 25 } |
27 | 26 |
28 # Keep JNI interfaces. | 27 # Keep JNI interfaces. |
29 -keepclasseswithmembers class com.android.webview.chromium.**,org.chromium.** { | 28 -keepclasseswithmembers class com.android.webview.chromium.**,org.chromium.** { |
30 @**.AccessedByNative <fields>; | 29 @**.AccessedByNative <fields>; |
31 } | 30 } |
32 -keepclasseswithmembers class com.android.webview.chromium.**,org.chromium.** { | 31 -keepclasseswithmembers class com.android.webview.chromium.**,org.chromium.** { |
33 @**.CalledByNative <methods>; | 32 @**.CalledByNative <methods>; |
34 } | 33 } |
35 -keepclasseswithmembers class com.android.webview.chromium.**,org.chromium.** { | 34 -keepclasseswithmembers class com.android.webview.chromium.**,org.chromium.** { |
36 @**.CalledByNativeUnchecked <methods>; | 35 @**.CalledByNativeUnchecked <methods>; |
37 } | 36 } |
38 -keepclasseswithmembers class com.android.webview.chromium.**,org.chromium.** { | 37 -keepclasseswithmembers class com.android.webview.chromium.**,org.chromium.** { |
39 native <methods>; | 38 native <methods>; |
40 } | 39 } |
41 | 40 |
42 # Keep things explicitly marked as used by reflection | 41 # Keep classes marked as used by reflection |
42 -keep @**.UsedByReflection class * | |
43 | |
44 # Keep members explicitly marked as used by reflection | |
43 -keepclasseswithmembers class com.android.webview.chromium.**,org.chromium.** { | 45 -keepclasseswithmembers class com.android.webview.chromium.**,org.chromium.** { |
44 @**.UsedByReflection *; | 46 @**.UsedByReflection *; |
45 } | 47 } |
46 | 48 |
47 # Linker dynamically casts to $TestRunner when running tests. We don't run these | 49 # Linker dynamically casts to $TestRunner when running tests. We don't run these |
48 # tests in WebView. | 50 # tests in WebView. |
49 -dontnote org.chromium.base.library_loader.Linker$TestRunner | 51 -dontnote org.chromium.base.library_loader.Linker$TestRunner |
50 | 52 |
51 # Don't note about the API 21 compatibility code which references various | 53 # Don't note about the API 21 compatibility code which references various |
52 # hidden APIs via reflection. | 54 # hidden APIs via reflection. |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
92 -dontnote android.support.** | 94 -dontnote android.support.** |
93 -dontwarn android.support.** | 95 -dontwarn android.support.** |
94 | 96 |
95 # Keep all enum values and valueOf methods. See | 97 # Keep all enum values and valueOf methods. See |
96 # http://proguard.sourceforge.net/index.html#manual/examples.html | 98 # http://proguard.sourceforge.net/index.html#manual/examples.html |
97 # for the reason for this. Also, see http://crbug.com/248037. | 99 # for the reason for this. Also, see http://crbug.com/248037. |
98 -keepclassmembers enum * { | 100 -keepclassmembers enum * { |
99 public static **[] values(); | 101 public static **[] values(); |
100 public static ** valueOf(java.lang.String); | 102 public static ** valueOf(java.lang.String); |
101 } | 103 } |
OLD | NEW |