123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426 |
- # 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
- #指定压缩级别
- -optimizationpasses 5
- #不跳过非公共的库的类成员
- -dontskipnonpubliclibraryclassmembers
- #混淆时采用的算法
- -optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
- #把混淆类中的方法名也混淆了
- -useuniqueclassmembernames
- # 屏蔽警告
- -ignorewarnings
- #优化时允许访问并修改有修饰符的类和类的成员
- -allowaccessmodification
- #将文件来源重命名为“SourceFile”字符串
- -renamesourcefileattribute SourceFile
- #保留行号
- -keepattributes SourceFile,LineNumberTable
- #保持所有实现 Serializable 接口的类成员
- -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();
- }
- -keep public class * implements android.os.Parcelable{*;}
- -keepclasseswithmembers class * implements android.os.Parcelable {*;}
- #避免混淆Annotation、内部类、泛型、匿名类
- -keepattributes InnerClasses,Signature,EnclosingMethod
- #处理support包
- -dontnote android.support.**
- -dontwarn android.support.**
- #保留四大组件,自定义的Application等这些类不被混淆
- -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.preference.Preference
- -keep public class com.android.vending.licensing.ILicensingService
- #保留枚举类不被混淆
- -keep class * implements android.os.Parcelable {
- public static final android.os.Parcelable$Creator *;
- }
- #Fragment不需要在AndroidManifest.xml中注册,需要额外保护下
- -keep public class * extends android.support.v4.app.Fragment
- -keep public class * extends android.app.Fragment
- -keep public class * extends androidx.fragment.app.Fragment
- -keepclasseswithmembernames class * {
- native <methods>;
- }
- -printmapping mapping.txt #混淆后文件映射
- -keepclasseswithmembers class * {
- public <init>(android.content.Context);
- }
- -keepclasseswithmembers class * {
- public <init>(android.content.Context, android.util.AttributeSet);
- }
- -keepclasseswithmembers class * {
- public <init>(android.content.Context, android.util.AttributeSet, int);
- }
- -keepclassmembers enum * {
- public static **[] values();
- public static ** valueOf(java.lang.String);
- }
- #webView需要进行特殊处理
- -keepclassmembers class fqcn.of.javascript.interface.for.Webview {
- public *;
- }
- -keepclassmembers class * extends android.webkit.WebViewClient {
- public void *(android.webkit.WebView, java.lang.String, android.graphics.Bitmap);
- public boolean *(android.webkit.WebView, java.lang.String);
- }
- -keepclassmembers class * extends android.webkit.WebViewClient {
- public void *(android.webkit.WebView, jav.lang.String);
- }
- #表示不混淆任何一个View中的setXxx()和getXxx()方法,
- #因为属性动画需要有相应的setter和getter的方法实现,混淆了就无法工作了。
- -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 * extends java.lang.annotation.Annotation {*;}
- ##Gson
- -dontwarn com.google.**
- -keep class com.google.gson.** {*;}
- #otto
- -keepattributes *Annotation*
- -keepclassmembers class ** {
- @com.squareup.Subscribe public *;
- @com.squareup.otto.Produce public *;
- }
- #xlib
- -dontwarn x.lib.**
- -keep class x.lib.**{*;}
- #entity
- -keep class com.starbuds.app.entity.**{*;}
- #-keep class com.starbuds.app.entity.db.**{*;}
- -dontwarn com.starbuds.app.widget.**
- -keep class com.starbuds.app.widget.**{*;}
- #友盟
- -keep class com.umeng.** {*;}
- -keep class com.uc.** {*;}
- -keepclassmembers class * {
- public <init> (org.json.JSONObject);
- }
- -keepclassmembers enum * {
- public static **[] values();
- public static ** valueOf(java.lang.String);
- }
- -keep class com.zui.** {*;}
- -keep class com.miui.** {*;}
- -keep class com.heytap.** {*;}
- -keep class a.** {*;}
- -keep class com.vivo.** {*;}
- -keep public class com.starbuds.app.R$*{
- public static final int *;
- }
- #字节美颜
- -keep class com.bytedance.labcv.effectsdk.**{*;}
- #okhttp
- -dontwarn com.squareup.okhttp.**
- -keep class com.squareup.okhttp.** {*;}
- -keep interface com.squareup.okhttp.** {*;}
- -dontwarn okio.**
- #Glide
- -dontwarn com.bumptech.glide.**
- -keep class com.bumptech.glide.**{*;}
- -keep public class * implements com.bumptech.glide.module.GlideModule
- -keep public class * extends com.bumptech.glide.AppGlideModule
- -keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
- **[] $VALUES;
- public *;
- }
- -keep public class * implements com.bumptech.glide.module.GlideModule
- -keep class * extends com.bumptech.glide.module.AppGlideModule {
- <init>(...);
- }
- -keep public enum com.bumptech.glide.load.ImageHeaderParser$** {
- **[] $VALUES;
- public *;
- }
- -keep class com.bumptech.glide.load.data.ParcelFileDescriptorRewinder$InternalRewinder {
- *** rewind();
- }
- #SVGA
- -keep class com.squareup.wire.** { *; }
- -keep class com.opensource.svgaplayer.proto.** { *; }
- #声网
- -keep class io.agora.**{*;}
- #闪验
- -dontwarn com.cmic.sso.sdk.**
- -dontwarn com.sdk.**
- -keep class com.cmic.sso.sdk.**{*;}
- -keep class com.sdk.** { *;}
- -keep class cn.com.chinatelecom.account.api.**{*;}
- # 七牛视频混淆
- -keep class com.pili.pldroid.player.** { *; }
- -keep class com.qiniu.qplayer.mediaEngine.MediaPlayer{*;}
- -keep class com.qiniu.pili.droid.**{*;}
- -keep class com.qiniu.pili.droid.streaming.** { *; }
- # 七牛RTC混淆
- -keep class com.youme.** {*;}
- -keep class org.webrtc.** {*;}
- -keep class com.qiniu.android.dns.** {*;}
- -keep class com.qiniu.pili.droid.streaming.** {*;}
- -keep class com.sensetime.**{*;}
- # 七牛RTC混淆
- -keep class org.webrtc.** {*;}
- -dontwarn org.webrtc.**
- -keep class com.qiniu.droid.rtc.**{*;}
- -keep interface com.qiniu.droid.rtc.**{*;}
- # 阿里云推送混淆
- -keepclasseswithmembernames class ** {
- native <methods>;
- }
- -keep class sun.misc.Unsafe { *; }
- -keep class com.taobao.** {*;}
- -keep class com.alibaba.** {*;}
- -keep class com.alipay.** {*;}
- -keep class com.ut.** {*;}
- -keep class com.ta.** {*;}
- -keep class anet.**{*;}
- -keep class anetwork.**{*;}
- -keep class org.android.spdy.**{*;}
- -keep class org.android.agoo.**{*;}
- -keep class android.os.**{*;}
- -dontwarn com.taobao.**
- -dontwarn com.alibaba.**
- -dontwarn com.alipay.**
- -dontwarn anet.**
- -dontwarn org.android.spdy.**
- -dontwarn org.android.agoo.**
- -dontwarn anetwork.**
- -dontwarn com.ut.**
- -dontwarn com.ta.**
- -dontwarn com.aliyuncs.**
- -keep class com.aliyuncs.**{*;}
- # 阿里云RTC
- -keep class com.serenegiant.**{*;}
- -keep class org.webrtc.**{*;}
- -keep class com.alivc.**{*;}
- # UCrop
- -dontwarn com.yalantis.ucrop**
- -keep class com.yalantis.ucrop** { *; }
- -keep interface com.yalantis.ucrop** { *; }
- # 华为
- -ignorewarning
- -keepattributes *Annotation*
- -keepattributes Exceptions
- -keepattributes InnerClasses
- -keepattributes Signature
- -keepattributes SourceFile,LineNumberTable
- -keep class com.hianalytics.android.**{*;}
- -keep class com.huawei.updatesdk.**{*;}
- -keep class com.huawei.hms.**{*;}
- -keep class com.huawei.android.hms.agent.**{*;}
- -keep class com.huawei.gamebox.plugin.gameservice.**{*;}
- # 定位
- -keep class com.amap.api.location.**{*;}
- -keep class com.amap.api.fence.**{*;}
- -keep class com.loc.**{*;}
- -keep class com.autonavi.aps.amapapi.model.**{*;}
- # jzvd
- -keep public class cn.jzvd.JZMediaSystem {*; }
- -keep public class cn.jzvd.demo.CustomMedia.CustomMedia {*; }
- -keep public class cn.jzvd.demo.CustomMedia.JZMediaIjk {*; }
- -keep public class cn.jzvd.demo.CustomMedia.JZMediaSystemAssertFolder {*; }
- -keep class tv.danmaku.ijk.media.player.** {*; }
- -dontwarn tv.danmaku.ijk.media.player.*
- -keep interface tv.danmaku.ijk.media.player.** { *; }
- # 腾讯IM
- -keep class com.tencent.** { *; }
- # 微信
- -keep class com.tencent.mm.opensdk.** {*;}
- -keep class com.tencent.wxop.** {*;}
- -keep class com.tencent.mm.sdk.** {*;}
- # QQ
- -keep class com.tencent.imsdk.** {*;}
- # 微博
- -keep class com.sina.weibo.sdk.** { *; }
- # Bugly
- -dontwarn com.tencent.bugly.**
- -keep public class com.tencent.bugly.**{*;}
- -keep class org.greenrobot.greendao.**{*;}
- -keepclassmembers class * extends org.greenrobot.greendao.AbstractDao {
- public static java.lang.String TABLENAME;
- }
- -keep class **$Properties
- -keep class net.sqlcipher.database.**{*;}
- -keep public interface net.sqlcipher.database.**
- -dontwarn net.sqlcipher.database.**
- -dontwarn org.greenrobot.greendao.**
- -keepclassmembers class ** {
- @org.greenrobot.eventbus.Subscribe <methods>;
- }
- -keep enum org.greenrobot.eventbus.ThreadMode { *; }
- # Only required if you use AsyncExecutor
- -keepclassmembers class * extends org.greenrobot.eventbus.util.ThrowableFailureEvent {
- <init>(java.lang.Throwable);
- }
- # ali
- -keepclasseswithmembernames class ** {
- native <methods>;
- }
- -keepattributes Signature
- -keep class sun.misc.Unsafe { *; }
- -keep class com.taobao.** {*;}
- -keep class com.alibaba.** {*;}
- -keep class com.alipay.** {*;}
- -keep class com.ut.** {*;}
- -keep class com.ta.** {*;}
- -keep class anet.**{*;}
- -keep class anetwork.**{*;}
- -keep class org.android.spdy.**{*;}
- -keep class org.android.agoo.**{*;}
- -keep class android.os.**{*;}
- -keep class org.json.**{*;}
- -dontwarn com.taobao.**
- -dontwarn com.alibaba.**
- -dontwarn com.alipay.**
- -dontwarn anet.**
- -dontwarn org.android.spdy.**
- -dontwarn org.android.agoo.**
- -dontwarn anetwork.**
- -dontwarn com.ut.**
- -dontwarn com.ta.**
- # 小米通道
- -keep class com.xiaomi.** {*;}
- -dontwarn com.xiaomi.**
- # 华为通道
- -keep class com.huawei.** {*;}
- -dontwarn com.huawei.**
- # GCM/FCM通道
- -keep class com.google.firebase.**{*;}
- -dontwarn com.google.firebase.**
- # OPPO通道
- -keep public class * extends android.app.Service
- # VIVO通道
- -keep class com.vivo.** {*;}
- -dontwarn com.vivo.**
- # 魅族通道
- -keep class com.meizu.cloud.** {*;}
- -dontwarn com.meizu.cloud.**
- #Rxjava RxAndroid
- -dontwarn rx.*
- -dontwarn sun.misc.**
- -keep class rx.internal.**{*;}
- -keepattributes Exceptions,InnerClasses
- -keepattributes Signature
- -keep class io.rong.** {*;}
- -keep class cn.rongcloud.** {*;}
- -keep class * implements io.rong.imlib.model.MessageContent {*;}
- -dontwarn io.rong.push.**
- -dontnote com.xiaomi.**
- -dontnote com.google.android.gms.gcm.**
- -dontnote io.rong.**
- # 数美
- -keep class com.ishumei.** {*;}
- # 即构
- -keep class **.zego.**{*;}
- #pag
- -keep class org.libpag.* {*;}
- -ignorewarnings
- #ImmersionBar
- -keep class com.gyf.immersionbar.* {*;}
- -dontwarn com.gyf.immersionbar.**
- #security
- -keep class com.laylib.security.lib.* {*;}
- -dontwarn com.laylib.security.lib.**
- # 保持调用jni的类不被混淆
- -keep class android_serialport_api.*{*;}
- # 设置所有 native 方法不被混淆
- -keepclasseswithmembernames class * {
- native <methods>;
- }
|