OLD | NEW |
---|---|
1 # Keep line number information, useful for stack traces. | 1 # Keep line number information, useful for stack traces. |
2 -keepattributes SourceFile,LineNumberTable | 2 -keepattributes SourceFile,LineNumberTable |
3 | 3 |
4 # Keep all annotation related attributes that can affect runtime | 4 # Keep all annotation related attributes that can affect runtime |
5 -keepattributes RuntimeVisible*Annotations | 5 -keepattributes RuntimeVisible*Annotations |
6 -keepattributes AnnotationDefault | 6 -keepattributes AnnotationDefault |
7 | 7 |
8 # Keep the annotations, because if we don't, the ProGuard rules that use them | 8 # Keep the annotations, because if we don't, the ProGuard rules that use them |
9 # will not be respected. These classes then show up in our final dex, which we | 9 # will not be respected. These classes then show up in our final dex, which we |
10 # do not want - see crbug.com/628226. | 10 # do not want - see crbug.com/628226. |
11 -keep @interface org.chromium.base.annotations.AccessedByNative | 11 -keep @interface org.chromium.base.annotations.AccessedByNative |
12 -keep @interface org.chromium.base.annotations.CalledByNative | 12 -keep @interface org.chromium.base.annotations.CalledByNative |
13 -keep @interface org.chromium.base.annotations.CalledByNativeUnchecked | 13 -keep @interface org.chromium.base.annotations.CalledByNativeUnchecked |
14 -keep @interface org.chromium.base.annotations.RemovableInRelease | 14 -keep @interface org.chromium.base.annotations.RemovableInRelease |
15 -keep @interface org.chromium.base.annotations.UsedByReflection | 15 -keep @interface org.chromium.base.annotations.UsedByReflection |
16 | 16 |
17 # Keeps for class level annotations. | 17 # Keeps for class level annotations. |
18 -keep @org.chromium.base.annotations.UsedByReflection class * | 18 -keep @org.chromium.base.annotations.UsedByReflection class * |
19 | 19 |
20 # Keeps for method level annotations. | 20 # Keeps for method level annotations. |
21 -keepclasseswithmembers class * { | 21 -keepclasseswithmembers class * { |
smaier
2016/08/17 19:15:41
I'd prefer you just change this to -keepclassmembe
xunjieli
2016/08/17 19:23:55
Done.
| |
22 @android.webkit.JavascriptInterface <methods>; | |
23 } | |
24 -keepclasseswithmembers class * { | |
25 @org.chromium.base.annotations.AccessedByNative <fields>; | 22 @org.chromium.base.annotations.AccessedByNative <fields>; |
26 } | 23 } |
27 -keepclasseswithmembers,includedescriptorclasses class * { | 24 -keepclasseswithmembers,includedescriptorclasses class * { |
28 @org.chromium.base.annotations.CalledByNative <methods>; | 25 @org.chromium.base.annotations.CalledByNative <methods>; |
29 } | 26 } |
30 -keepclasseswithmembers,includedescriptorclasses class * { | 27 -keepclasseswithmembers,includedescriptorclasses class * { |
31 @org.chromium.base.annotations.CalledByNativeUnchecked <methods>; | 28 @org.chromium.base.annotations.CalledByNativeUnchecked <methods>; |
32 } | 29 } |
33 -keepclasseswithmembers class * { | 30 -keepclasseswithmembers class * { |
34 @org.chromium.base.annotations.UsedByReflection <methods>; | 31 @org.chromium.base.annotations.UsedByReflection <methods>; |
(...skipping 16 matching lines...) Expand all Loading... | |
51 static *** isLoggable(...); | 48 static *** isLoggable(...); |
52 } | 49 } |
53 | 50 |
54 # Keep all enum values and valueOf methods. See | 51 # Keep all enum values and valueOf methods. See |
55 # http://proguard.sourceforge.net/index.html#manual/examples.html | 52 # http://proguard.sourceforge.net/index.html#manual/examples.html |
56 # for the reason for this. Also, see http://crbug.com/248037. | 53 # for the reason for this. Also, see http://crbug.com/248037. |
57 -keepclassmembers enum * { | 54 -keepclassmembers enum * { |
58 public static **[] values(); | 55 public static **[] values(); |
59 public static ** valueOf(java.lang.String); | 56 public static ** valueOf(java.lang.String); |
60 } | 57 } |
OLD | NEW |