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