Chromium Code Reviews| 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. |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 30 -keepclasseswithmembers,includedescriptorclasses class * { | 30 -keepclasseswithmembers,includedescriptorclasses class * { |
| 31 @org.chromium.base.annotations.CalledByNativeUnchecked <methods>; | 31 @org.chromium.base.annotations.CalledByNativeUnchecked <methods>; |
| 32 } | 32 } |
| 33 -keepclasseswithmembers class * { | 33 -keepclasseswithmembers class * { |
| 34 @org.chromium.base.annotations.UsedByReflection <methods>; | 34 @org.chromium.base.annotations.UsedByReflection <methods>; |
| 35 } | 35 } |
| 36 -keepclasseswithmembers,includedescriptorclasses class * { | 36 -keepclasseswithmembers,includedescriptorclasses class * { |
| 37 native <methods>; | 37 native <methods>; |
| 38 } | 38 } |
| 39 | 39 |
| 40 # Keep all Parcelables as they might be marshalled outside Chrome. | |
| 41 -keepnames class * implements android.os.Parcelable { | |
|
smaier
2016/08/18 14:42:29
This rule should become:
-keepclassmembers class
| |
| 42 public static final ** CREATOR; | |
| 43 } | |
| 44 | |
| 40 # Remove methods annotated with this if their return value is unused | 45 # Remove methods annotated with this if their return value is unused |
| 41 -assumenosideeffects class ** { | 46 -assumenosideeffects class ** { |
| 42 @org.chromium.base.annotations.RemovableInRelease <methods>; | 47 @org.chromium.base.annotations.RemovableInRelease <methods>; |
| 43 } | 48 } |
| 44 | 49 |
| 45 # Allows Proguard freedom in removing these log related calls. We ask for debug | 50 # Allows Proguard freedom in removing these log related calls. We ask for debug |
| 46 # and verbose logs to be stripped out in base.Log, so we are just ensuring we | 51 # and verbose logs to be stripped out in base.Log, so we are just ensuring we |
| 47 # get rid of all other debug/verbose logs. | 52 # get rid of all other debug/verbose logs. |
| 48 -assumenosideeffects class android.util.Log { | 53 -assumenosideeffects class android.util.Log { |
| 49 static *** d(...); | 54 static *** d(...); |
| 50 static *** v(...); | 55 static *** v(...); |
| 51 static *** isLoggable(...); | 56 static *** isLoggable(...); |
| 52 } | 57 } |
| 53 | 58 |
| 54 # Keep all enum values and valueOf methods. See | 59 # Keep all enum values and valueOf methods. See |
| 55 # http://proguard.sourceforge.net/index.html#manual/examples.html | 60 # http://proguard.sourceforge.net/index.html#manual/examples.html |
| 56 # for the reason for this. Also, see http://crbug.com/248037. | 61 # for the reason for this. Also, see http://crbug.com/248037. |
| 57 -keepclassmembers enum * { | 62 -keepclassmembers enum * { |
| 58 public static **[] values(); | 63 public static **[] values(); |
| 59 } | 64 } |
| 65 | |
| OLD | NEW |