1# To prevent name conflict in incremental obfuscation. 2-useuniqueclassmembernames 3 4# Some classes in the libraries extend package private classes to chare common functionality 5# that isn't explicitly part of the API 6-dontskipnonpubliclibraryclasses -dontskipnonpubliclibraryclassmembers 7 8# For enumeration classes, see http://proguard.sourceforge.net/manual/examples.html#enumerations 9-keepclassmembers enum * { 10 public static **[] values(); 11 public static ** valueOf(java.lang.String); 12} 13 14# For native methods, see http://proguard.sourceforge.net/manual/examples.html#native 15-keepclasseswithmembernames class * { 16 native <methods>; 17} 18 19# class$ methods are inserted by some compilers to implement .class construct, 20# see http://proguard.sourceforge.net/manual/examples.html#library 21-keepclassmembernames class * { 22 java.lang.Class class$(java.lang.String); 23 java.lang.Class class$(java.lang.String, boolean); 24} 25 26# Keep serializable classes and necessary members for serializable classes 27# Copied from the ProGuard manual at http://proguard.sourceforge.net. 28-keepnames class * implements java.io.Serializable 29-keepclassmembers class * implements java.io.Serializable { 30 static final long serialVersionUID; 31 private static final java.io.ObjectStreamField[] serialPersistentFields; 32 !static !transient <fields>; 33 private void writeObject(java.io.ObjectOutputStream); 34 private void readObject(java.io.ObjectInputStream); 35 java.lang.Object writeReplace(); 36 java.lang.Object readResolve(); 37} 38 39# Keep Throwable's constructor that takes a String argument. 40-keepclassmembers class * extends java.lang.Throwable { 41 <init>(java.lang.String); 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# Parcelable CREATORs must be kept for Parcelable functionality 54-keep class * implements android.os.Parcelable { 55 public static final ** CREATOR; 56} 57 58# The support library contains references to newer platform versions. 59# Don't warn about those in case this app is linking against an older 60# platform version. We know about them, and they are safe. 61# See proguard-android.txt in the SDK package. 62# 63# DO NOT USE THIS: We figured it's dangerous to blindly ignore all support library warnings. 64# ProGuard may strip members of subclass of unknown super classes, in case an app is linking against 65# LOCAL_SDK_VERSION lower than the support library's LOCAL_SDK_VERSION. 66# See bug/20658265. 67# -dontwarn android.support.** 68 69# Less spammy. 70-dontnote 71