Ying Wang | 5745351 | 2013-05-17 10:02:00 -0700 | [diff] [blame^] | 1 | # For enumeration classes, see http://proguard.sourceforge.net/manual/examples.html#enumerations |
| 2 | -keepclassmembers enum * { |
| 3 | public static **[] values(); |
| 4 | public static ** valueOf(java.lang.String); |
| 5 | } |
| 6 | |
| 7 | # For native methods, see http://proguard.sourceforge.net/manual/examples.html#native |
| 8 | -keepclasseswithmembernames class * { |
| 9 | native <methods>; |
| 10 | } |
| 11 | |
| 12 | # class$ methods are inserted by some compilers to implement .class construct, |
| 13 | # see http://proguard.sourceforge.net/manual/examples.html#library |
| 14 | -keepclassmembernames class * { |
| 15 | java.lang.Class class$(java.lang.String); |
| 16 | java.lang.Class class$(java.lang.String, boolean); |
| 17 | } |
| 18 | |
| 19 | # Keep classes and methods that have the guava @VisibleForTesting annotation |
| 20 | -keep @com.google.common.annotations.VisibleForTesting class * |
| 21 | -keepclassmembers class * { |
| 22 | @com.google.common.annotations.VisibleForTesting *; |
| 23 | } |
| 24 | |
| 25 | # Keep serializable classes and necessary members for serializable classes |
| 26 | # Copied from the ProGuard manual at http://proguard.sourceforge.net. |
| 27 | -keepnames class * implements java.io.Serializable |
| 28 | -keepclassmembers class * implements java.io.Serializable { |
| 29 | static final long serialVersionUID; |
| 30 | private static final java.io.ObjectStreamField[] serialPersistentFields; |
| 31 | !static !transient <fields>; |
| 32 | private void writeObject(java.io.ObjectOutputStream); |
| 33 | private void readObject(java.io.ObjectInputStream); |
| 34 | java.lang.Object writeReplace(); |
| 35 | java.lang.Object readResolve(); |
| 36 | } |
| 37 | |
| 38 | # Please specify classes to be kept explicitly in your package's configuration. |
| 39 | # -keep class * extends android.app.Activity |
| 40 | # -keep class * extends android.view.View |
| 41 | # -keep class * extends android.app.Service |
| 42 | # -keep class * extends android.content.BroadcastReceiver |
| 43 | # -keep class * extends android.content.ContentProvider |
| 44 | # -keep class * extends android.preference.Preference |
| 45 | # -keep class * extends android.app.BackupAgent |
| 46 | |
| 47 | #-keep class * implements android.os.Parcelable { |
| 48 | # public static final android.os.Parcelable$Creator *; |
| 49 | #} |
| 50 | |
| 51 | # The support library contains references to newer platform versions. |
| 52 | # Don't warn about those in case this app is linking against an older |
| 53 | # platform version. We know about them, and they are safe. |
| 54 | # See proguard-android.txt in the SDK package. |
| 55 | -dontwarn android.support.** |