OLD | NEW |
1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 # Contains flags that can be safely shared with Cronet, and thus would be | 5 # Contains flags that can be safely shared with Cronet, and thus would be |
6 # appropriate for third-party apps to include. | 6 # appropriate for third-party apps to include. |
7 | 7 |
8 # Keep all annotation related attributes that can affect runtime | 8 # Keep all annotation related attributes that can affect runtime |
9 -keepattributes RuntimeVisible*Annotations | 9 -keepattributes RuntimeVisible*Annotations |
10 -keepattributes AnnotationDefault | 10 -keepattributes AnnotationDefault |
(...skipping 16 matching lines...) Expand all Loading... |
27 } | 27 } |
28 -keepclasseswithmembers,includedescriptorclasses class * { | 28 -keepclasseswithmembers,includedescriptorclasses class * { |
29 @org.chromium.base.annotations.CalledByNative <methods>; | 29 @org.chromium.base.annotations.CalledByNative <methods>; |
30 } | 30 } |
31 -keepclasseswithmembers,includedescriptorclasses class * { | 31 -keepclasseswithmembers,includedescriptorclasses class * { |
32 @org.chromium.base.annotations.CalledByNativeUnchecked <methods>; | 32 @org.chromium.base.annotations.CalledByNativeUnchecked <methods>; |
33 } | 33 } |
34 -keepclasseswithmembers class * { | 34 -keepclasseswithmembers class * { |
35 @org.chromium.base.annotations.UsedByReflection <methods>; | 35 @org.chromium.base.annotations.UsedByReflection <methods>; |
36 } | 36 } |
| 37 -keepclasseswithmembers class * { |
| 38 @org.chromium.base.annotations.UsedByReflection <fields>; |
| 39 } |
37 -keepclasseswithmembers,includedescriptorclasses class * { | 40 -keepclasseswithmembers,includedescriptorclasses class * { |
38 native <methods>; | 41 native <methods>; |
39 } | 42 } |
40 | 43 |
41 # Remove methods annotated with this if their return value is unused. | 44 # Remove methods annotated with this if their return value is unused. |
42 -assumenosideeffects class ** { | 45 -assumenosideeffects class ** { |
43 @org.chromium.base.annotations.RemovableInRelease <methods>; | 46 @org.chromium.base.annotations.RemovableInRelease <methods>; |
44 } | 47 } |
45 | 48 |
46 # Keep all CREATOR fields within Parcelable that are kept. | 49 # Keep all CREATOR fields within Parcelable that are kept. |
47 -keepclassmembers class org.chromium.** implements android.os.Parcelable { | 50 -keepclassmembers class org.chromium.** implements android.os.Parcelable { |
48 public static *** CREATOR; | 51 public static *** CREATOR; |
49 } | 52 } |
50 | 53 |
51 # Don't obfuscate Parcelables as they might be marshalled outside Chrome. | 54 # Don't obfuscate Parcelables as they might be marshalled outside Chrome. |
52 # If we annotated all Parcelables that get put into Bundles other than | 55 # If we annotated all Parcelables that get put into Bundles other than |
53 # for saveInstanceState (e.g. PendingIntents), then we could actually keep the | 56 # for saveInstanceState (e.g. PendingIntents), then we could actually keep the |
54 # names of just those ones. For now, we'll just keep them all. | 57 # names of just those ones. For now, we'll just keep them all. |
55 -keepnames class org.chromium.** implements android.os.Parcelable | 58 -keepnames class org.chromium.** implements android.os.Parcelable |
56 | 59 |
57 # Keep all enum values and valueOf methods. See | 60 # Keep all enum values and valueOf methods. See |
58 # http://proguard.sourceforge.net/index.html#manual/examples.html | 61 # http://proguard.sourceforge.net/index.html#manual/examples.html |
59 # for the reason for this. Also, see http://crbug.com/248037. | 62 # for the reason for this. Also, see http://crbug.com/248037. |
60 -keepclassmembers enum org.chromium.** { | 63 -keepclassmembers enum org.chromium.** { |
61 public static **[] values(); | 64 public static **[] values(); |
62 } | 65 } |
OLD | NEW |