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 25 matching lines...) Expand all Loading... | |
| 36 -keepclasseswithmembers,includedescriptorclasses class * { | 36 -keepclasseswithmembers,includedescriptorclasses class * { |
| 37 native <methods>; | 37 native <methods>; |
| 38 } | 38 } |
| 39 | 39 |
| 40 # Keep all CREATOR fields within Parcelable that are kept. | 40 # Keep all CREATOR fields within Parcelable that are kept. |
| 41 -keepclassmembers class * implements android.os.Parcelable { | 41 -keepclassmembers class * implements android.os.Parcelable { |
| 42 public static *** CREATOR; | 42 public static *** CREATOR; |
| 43 } | 43 } |
| 44 | 44 |
| 45 # Don't obfuscate Parcelables as they might be marshalled outside Chrome. | 45 # Don't obfuscate Parcelables as they might be marshalled outside Chrome. |
| 46 # If we annotated all Parcelables that get put into Bundles other than | |
|
Ian Wen
2016/09/02 20:25:54
The content of the new comment sounds like a TODO.
agrieve
2016/09/02 20:34:58
It's more of a NEVERDO I think :P
| |
| 47 # for saveInstanceState (e.g. PendingIntents), then we could actually keep the | |
| 48 # names of just those ones. For now, we'll just keep them all. | |
| 46 -keepnames class * implements android.os.Parcelable | 49 -keepnames class * implements android.os.Parcelable |
| 47 | 50 |
| 48 # Keep all Parcelables, since Play Services has some that are used only by | |
| 49 # reflection. | |
| 50 # TODO(agrieve): Remove this once proguard flags provided by play services via | |
| 51 # .aars are used. https://crbug.com/640836 | |
| 52 -keep class * implements android.os.Parcelable | |
| 53 | |
| 54 # Remove methods annotated with this if their return value is unused | 51 # Remove methods annotated with this if their return value is unused |
| 55 -assumenosideeffects class ** { | 52 -assumenosideeffects class ** { |
| 56 @org.chromium.base.annotations.RemovableInRelease <methods>; | 53 @org.chromium.base.annotations.RemovableInRelease <methods>; |
| 57 } | 54 } |
| 58 | 55 |
| 59 # Keep all enum values and valueOf methods. See | 56 # Keep all enum values and valueOf methods. See |
| 60 # http://proguard.sourceforge.net/index.html#manual/examples.html | 57 # http://proguard.sourceforge.net/index.html#manual/examples.html |
| 61 # for the reason for this. Also, see http://crbug.com/248037. | 58 # for the reason for this. Also, see http://crbug.com/248037. |
| 62 -keepclassmembers enum * { | 59 -keepclassmembers enum * { |
| 63 public static **[] values(); | 60 public static **[] values(); |
| 64 } | 61 } |
| 65 | 62 |
| OLD | NEW |