123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209 |
- #---------------------------------基本指令区----------------------------------
- -optimizationpasses 5
- -dontusemixedcaseclassnames
- -dontskipnonpubliclibraryclasses
- -dontskipnonpubliclibraryclassmembers
- -dontpreverify
- -verbose
- -printmapping proguardMapping.txt
- -optimizations !code/simplification/cast,!field/*,!class/merging/*
- -keepattributes *Annotation*,InnerClasses
- -keepattributes Signature
- -keepattributes SourceFile,LineNumberTable
- #---------------------------------默认保留区---------------------------------
- -keep public class * extends android.app.Activity
- -keep public class * extends android.app.Application
- -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
- -keep public class * extends android.view.View
- -keep class android.support.** {*;}
- -keepclasseswithmembernames class * {
- native <methods>;
- }
- -keepclassmembers class * extends android.app.Activity{
- public void *(android.view.View);
- }
- -keepclassmembers enum * {
- public static **[] values();
- public static ** valueOf(java.lang.String);
- }
- -keep public class * extends android.view.View{
- *** get*();
- void set*(***);
- public <init>(android.content.Context);
- public <init>(android.content.Context, android.util.AttributeSet);
- public <init>(android.content.Context, android.util.AttributeSet, int);
- }
- -keepclasseswithmembers class * {
- public <init>(android.content.Context, android.util.AttributeSet);
- public <init>(android.content.Context, android.util.AttributeSet, int);
- }
- -keep class * implements android.os.Parcelable {
- public static final android.os.Parcelable$Creator *;
- }
- -keepclassmembers class * implements java.io.Serializable {
- static final long serialVersionUID;
- private static final java.io.ObjectStreamField[] serialPersistentFields;
- private void writeObject(java.io.ObjectOutputStream);
- private void readObject(java.io.ObjectInputStream);
- java.lang.Object writeReplace();
- java.lang.Object readResolve();
- }
- # ActionBarSherlock
- -keep class android.support.** { *; }
- -keep interface android.support.** { *; }
- -keep class com.actionbarsherlock.** { *; }
- -keep interface com.actionbarsherlock.** { *; }
- # Keep line numbers to alleviate debugging stack traces
- -renamesourcefileattribute SourceFile
- -keep class **.R$* {
- *;
- }
- -ignorewarnings
- -keep class * {
- public private *;
- }
- -keepclassmembers class * {
- void *(**On*Event);
- }
- -keep class * implements com.guadou.lib_baselib.base.mvi.BaseViewState
- #----------------------------------------------------------------------------
- #---------------------------------1.实体类---------------------------------
- -keep class com.guadou.kt_zoom.bean.** { *; }
- -keep class com.guadou.lib_baselib.bean.** { *; }
- #--------------------------------第三方混淆--------------------------------------------
- # OkHttp3
- -dontwarn okhttp3.logging.**
- -keep class okhttp3.internal.**{*;}
- -dontwarn okio.**
- #glide
- -keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
- **[] $VALUES;
- public *;
- }
- # Gson
- -keepattributes *Annotation*
- -keepattributes Signature
- -dontwarn sun.misc.**
- -keep class com.google.gson.stream.** { *; }
- -keep class com.google.gson.examples.android.model.** { *; }
- -keep class * implements com.google.gson.TypeAdapterFactory
- -keep class * implements com.google.gson.JsonSerializer
- -keep class * implements com.google.gson.JsonDeserializer
- # Retrofit
- -dontwarn retrofit2.**
- -keep class retrofit2.** { *; }
- -keepattributes Signature
- -keepattributes Exceptions
- # converters and adapters. 是否要注释
- -keepclassmembernames,allowobfuscation interface * {
- @retrofit2.http.* <methods>;
- }
- -dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
- #Retrofit+rxjava+rxandroid+gson+okhttp
- -dontwarn javax.annotation.**
- -dontwarn javax.inject.**
- #AndPermission
- -dontwarn com.yanzhenjie.permission.**
- #极光推送
- -dontoptimize
- -dontpreverify
- -dontwarn cn.jpush.**
- -keep class cn.jpush.** { *; }
- #okhttp
- -dontwarn okhttp3.**
- -keep class okhttp3.**{*;}
- #okio
- -dontwarn okio.**
- -keep class okio.**{*;}
- #brvah
- -keep class com.chad.library.adapter.** {
- *;
- }
- -keep public class * extends com.chad.library.adapter.base.BaseQuickAdapter
- -keep public class * extends com.chad.library.adapter.base.viewholder.BaseViewHolder
- -keepclassmembers class **$** extends com.chad.library.adapter.base.viewholder.BaseViewHolder {
- <init>(...);
- }
- #==================其他==========================
- -dontwarn com.google.**
- -keep class com.google.gson.** {*;}
- -keep class com.google.protobuf.** {*;}
- -keep class com.google.gson.examples.android.model.** { *; }
- -keep class * implements com.google.gson.TypeAdapterFactory
- -keep class * implements com.google.gson.JsonSerializer
- -keep class * implements com.google.gson.JsonDeserializer
- #Gson容错处理
- -keep class com.ke.gson.** { *; }
- ##腾讯系列
- #-keep class com.tencent.** { *; }
- #LiveBus
- -dontwarn com.jeremyliao.liveeventbus.**
- -keep class com.jeremyliao.liveeventbus.** { *; }
- -keep class androidx.lifecycle.** { *; }
- -keep class androidx.arch.core.** { *; }
- # Rules for Kotlin Coroutines
- -keepnames class kotlinx.coroutines.internal.MainDispatcherFactory {}
- -keepnames class kotlinx.coroutines.CoroutineExceptionHandler {}
- -keepnames class kotlinx.coroutines.android.AndroidExceptionPreHandler {}
- -keepnames class kotlinx.coroutines.android.AndroidDispatcherFactory {}
- -keepclassmembernames class kotlinx.** {
- volatile <fields>;
- }
- #PictureSelector 2.0
- -keep class com.luck.picture.lib.** { *; }
- #Ucrop
- -dontwarn com.yalantis.ucrop**
- -keep class com.yalantis.ucrop** { *; }
- -keep interface com.yalantis.ucrop** { *; }
- #Okio
- -dontwarn org.codehaus.mojo.animal_sniffer.*
- #ARouter
- -keep public class com.alibaba.android.arouter.routes.**{*;}
- -keep public class com.alibaba.android.arouter.facade.**{*;}
- -keep class * implements com.alibaba.android.arouter.facade.template.ISyringe{*;}
- # 如果使用了 byType 的方式获取 Service,需添加下面规则,保护接口
- -keep interface * implements com.alibaba.android.arouter.facade.template.IProvider
- # 如果使用了 单类注入,即不定义接口实现 IProvider,需添加下面规则,保护实现
- # -keep class * implements com.alibaba.android.arouter.facade.template.IProvider
|