# Add project specific ProGuard rules here. # You can control the set of applied configuration files using the # proguardFiles setting in build.gradle. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html # If your project uses WebView with JS, uncomment the following # and specify the fully qualified class name to the JavaScript interface # class: #-keepclassmembers class fqcn.of.javascript.interface.for.webview { # public *; #} # Uncomment this to preserve the line number information for # debugging stack traces. #-keepattributes SourceFile,LineNumberTable # If you keep the line number information, uncomment this to # hide the original source file name. #-renamesourcefileattribute SourceFile # 代码混淆压缩比,在0~7之间,默认为5,一般不做修改 -optimizationpasses 7 # 混合时不使用大小写混合,混合后的类名为小写 -dontusemixedcaseclassnames # 指定不去忽略非公共库的类 -dontskipnonpubliclibraryclasses -dontoptimize # 这句话能够使我们的项目混淆后产生映射文件 # 包含有类名->混淆后类名的映射关系 -verbose -ignorewarnings # 指定不去忽略非公共库的类成员 -dontskipnonpubliclibraryclassmembers # 指定混淆是采用的算法,后面的参数是一个过滤器 # 这个过滤器是谷歌推荐的算法,一般不做更改 -optimizations !code/simplification/arithmetic,!field/*,!class/merging/* # 保留java与js交互注解 -keepattributes *Annotation* -keepattributes *JavascriptInterface* # 保留内部类 -keepattributes Exceptions,InnerClasses # 保留泛型 -keepattributes Signature -keepnames class * implements java.io.Serializable -keepclassmembers class * implements java.io.Serializable { static final long serialVersionUID; private static final java.io.ObjectStreamField[] serialPersistentFields; !static !transient ; private void writeObject(java.io.ObjectOutputStream); private void readObject(java.io.ObjectInputStream); java.lang.Object writeReplace(); java.lang.Object readResolve(); } -keepclassmembers class **.R$* { public static ; } -keep class **.R$* { *; } -keep public class * extends android.app.Activity{ public ; public ; } -keep public class * extends android.app.Application{ public ; public ; } -keep public class * extends android.app.Service -keep public class * extends android.content.BroadcastReceiver -keep public class * extends android.content.ContentProvider -keep public class * extends android.app.backup.BackupAgentHelper -keep public class * extends android.preference.Preference -keepclassmembers enum * { public static **[] values(); public static ** valueOf(java.lang.String); } -keepclasseswithmembers class * { public (android.content.Context, android.util.AttributeSet); } -keepclasseswithmembers class * { public (android.content.Context, android.util.AttributeSet, int); } -keepclasseswithmembernames class *{ native ; } -keep class * implements android.os.Parcelable { public static final android.os.Parcelable$Creator *; } -keepclasseswithmembers class * { ... *JNI*(...); } -keepclasseswithmembernames class * { ... *JRI*(...); } -keep class **JNI* {*;} -keep class android.support.annotation.**{*;} -keep class cn.yyxx.support.AndroidBug5497Workaround{ public ;public ;} -keep class cn.yyxx.support.AppUtils{ public ;public ;} -keep class cn.yyxx.support.BeanUtils{ public ;public ;} -keep class cn.yyxx.support.device.DeviceInfoUtils{ public ;public ;} -keep class cn.yyxx.support.DensityUtils{ public ;public ;} -keep class cn.yyxx.support.JsonUtils{ public ;public ;} -keep class cn.yyxx.support.ui.**{ *;} -keep class cn.yyxx.support.encryption.**{ public ; public ;} -keep class cn.yyxx.support.FileUtils{ public ;public ;} -keep class cn.yyxx.support.ReflectUtils{ public ;public ;} -keep class cn.yyxx.support.HostModelUtils{ public ;public ;} -keep class cn.yyxx.support.PropertiesUtils{ public ;public ;} -keep class cn.yyxx.support.ResUtils{ public ;public ;} -keep class cn.yyxx.support.StrUtils{ public ;public ;} -keep class cn.yyxx.support.scheduler.**{ public ;public ;} -keep class cn.yyxx.support.msa.**{ public ; public ;} -keep class cn.yyxx.support.gaid.**{ public ; public ;} -keep class cn.yyxx.support.hawkeye.**{ public ; public ;} -keep class cn.yyxx.support.cache.**{ public ; public ;} -keep class cn.yyxx.support.multidex.**{ public ; public ;} -keep class cn.yyxx.support.volley.**{ *;} -keep class cn.yyxx.support.permission.PermissionKit{ public ; public ;} -keep class cn.yyxx.support.permission.Permission{ *;} -keep class cn.yyxx.support.permission.Permission$Group{ *;} -keep class cn.yyxx.support.permission.PermissionKitActivity{ public ; public ;} -keep class cn.yyxx.support.permission.IPermissionCallback{ public ; public ;}