382 lines
12 KiB
Prolog
382 lines
12 KiB
Prolog
# 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
|
||
|
||
#优化时允许访问并修改有修饰符的类和类的成员
|
||
-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();
|
||
#}
|
||
##包名不混合大小写
|
||
#-dontusemixedcaseclassnames
|
||
#
|
||
##不跳过非公共的库的类
|
||
#-dontskipnonpubliclibraryclasses
|
||
#
|
||
##混淆时记录日志
|
||
#-verbose
|
||
#
|
||
##关闭预校验
|
||
#-dontpreverify
|
||
#
|
||
##不优化输入的类文件
|
||
#-dontoptimize
|
||
#
|
||
##保护注解
|
||
#-keepattributes *Annotation*
|
||
#-keep public class * extends com.rq.base.ui.BaseController
|
||
-keep class com.jia.er.nebuluxe.app.data.** { *; }
|
||
-keepclassmembernames class com.jia.er.nebuluxe.app.data.** { *;}
|
||
-keep public class * extends android.app.Service
|
||
|
||
-dontwarn android.support.v4.**
|
||
-keep class android.support.v4.app.** { *; }
|
||
-keep interface android.support.v4.app.** { *; }
|
||
-keep class android.support.v4.** { *; }
|
||
-keep public class * extends android.app.Application
|
||
|
||
|
||
|
||
-dontwarn android.support.v7.**
|
||
-keep class android.support.v7.internal.** { *; }
|
||
-keep interface android.support.v7.internal.** { *; }
|
||
-keep class android.support.v7.** { *; }
|
||
|
||
-keep public class * extends android.app.Activity
|
||
-keep public class * extends android.app.Fragment
|
||
-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 class com.gyf.immersionbar.* {*;}
|
||
-dontwarn com.gyf.immersionbar.**
|
||
|
||
-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);
|
||
}
|
||
-keep class * implements android.os.Parcelable {
|
||
|
||
public static final android.os.Parcelable$Creator *;
|
||
}
|
||
-keepclassmembernames class * {
|
||
@android.webkit.JavascriptInterface <methods>;
|
||
}
|
||
-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 <fields>;
|
||
!private <fields>;
|
||
!private <methods>;
|
||
private void writeObject(java.io.ObjectOutputStream);
|
||
private void readObject(java.io.ObjectInputStream);
|
||
java.lang.Object writeReplace();
|
||
java.lang.Object readResolve();
|
||
}
|
||
|
||
|
||
-keepclassmembers class * extends android.app.Activity {
|
||
public void *(android.view.View);
|
||
}
|
||
-keep class **.R$* {
|
||
*; }
|
||
-keepclassmembers enum * {
|
||
|
||
public static **[] values();
|
||
public static ** valueOf(java.lang.String);
|
||
}
|
||
|
||
|
||
-keepclasseswithmembernames class com.rq.**{*;}
|
||
|
||
#保持所有拥有本地方法的类名及本地方法名
|
||
-keepclasseswithmembernames class * {
|
||
native <methods>;
|
||
}
|
||
|
||
#保持自定义View的get和set相关方法
|
||
-keepclassmembers public class * extends android.view.View {
|
||
void set*(***);
|
||
*** get*();
|
||
}
|
||
|
||
#保持Activity中View及其子类入参的方法
|
||
-keepclassmembers class * extends android.app.Activity {
|
||
public void *(android.view.View);
|
||
}
|
||
|
||
#枚举
|
||
-keepclassmembers enum * {
|
||
**[] $VALUES;
|
||
public *;
|
||
}
|
||
|
||
#Parcelable
|
||
-keepclassmembers class * implements android.os.Parcelable {
|
||
public static final android.os.Parcelable$Creator CREATOR;
|
||
}
|
||
|
||
#R文件的静态成员
|
||
-keepclassmembers class **.R$* {
|
||
public static <fields>;
|
||
}
|
||
|
||
-dontwarn com.cmic.gen.sdk.**
|
||
-keep class com.cmic.gen.sdk.**{*;}
|
||
-dontwarn com.unicom.online.account.shield.**
|
||
-keep class com.unicom.online.account.shield.** {*;}
|
||
-dontwarn com.unicom.online.account.kernel.**
|
||
-keep class com.unicom.online.account.kernel.** {*;}
|
||
-keep class cn.com.chinatelecom.account.**{*;}
|
||
-keep public class * extends android.view.View
|
||
|
||
|
||
#-------------------------------------webView区---------------------------------------#
|
||
#WebView处理,项目中没有使用到webView忽略即可
|
||
#保持Android与JavaScript进行交互的类不被混淆
|
||
-keep class **.AndroidJavaScript {
|
||
*; }
|
||
-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.WebChromeClient {
|
||
|
||
public void *(android.webkit.WebView,java.lang.String);
|
||
}
|
||
################ EventBus ################
|
||
-keepattributes *Annotation*
|
||
-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);
|
||
}
|
||
################ EventBus ################
|
||
|
||
################ OAID ################
|
||
-keep class com.bun.miitmdid.** { *; }
|
||
-keep interface com.bun.supplier.** { *; }
|
||
-keep class androidx.core.**{*;}
|
||
# asus
|
||
-keep class com.asus.msa.SupplementaryDID.** { *; }
|
||
-keep class com.asus.msa.sdid.** { *; }
|
||
# freeme
|
||
-keep class com.android.creator.** { *; }
|
||
-keep class com.android.msasdk.** { *; }
|
||
# huawei -keep class com.huawei.hms.** {*;}
|
||
-keep interface com.huawei.hms.** {*;}
|
||
# lenovo
|
||
-keep class com.zui.deviceidservice.** { *; }
|
||
-keep class com.zui.opendeviceidlibrary.** { *; }
|
||
# meizu
|
||
-keep class com.meizu.flyme.openidsdk.** { *; }
|
||
# oppo
|
||
-keep class com.heytap.openid.** { *; }
|
||
# samsung
|
||
-keep class com.samsung.android.deviceidservice.** { *; }
|
||
# vivo
|
||
-keep class com.vivo.identifier.** { *; }
|
||
# xiaomi -keep class com.bun.miitmdid.provider.xiaomi.IdentifierManager
|
||
# zte
|
||
-keep class com.bun.lib.** { *; }
|
||
# coolpad
|
||
-keep class com.coolpad.deviceidsupport.** { *; }
|
||
# EEBBK
|
||
#None
|
||
# honor
|
||
-keep class com.hihonor.** {*; }
|
||
################ OAID ################
|
||
|
||
#//聚合混淆
|
||
-keep class bykvm*.**
|
||
-keep class com.bytedance.msdk.adapter.**{ public *; }
|
||
-keep class com.bytedance.msdk.api.** {
|
||
public *;
|
||
}
|
||
-keep class com.bytedance.msdk.base.TTBaseAd{*;}
|
||
-keep class com.bytedance.msdk.adapter.TTAbsAdLoaderAdapter{
|
||
public *;
|
||
protected <fields>;
|
||
}
|
||
|
||
# baidu sdk 不接入baidu sdk可以不引入
|
||
-ignorewarnings
|
||
-dontwarn com.baidu.mobads.sdk.api.**
|
||
-keepclassmembers class * extends android.app.Activity {
|
||
public void *(android.view.View);
|
||
}
|
||
|
||
-keepclassmembers enum * {
|
||
public static **[] values();
|
||
public static ** valueOf(java.lang.String);
|
||
}
|
||
|
||
-keep class com.baidu.mobads.** { *; }
|
||
-keep class com.style.widget.** {*;}
|
||
-keep class com.component.** {*;}
|
||
-keep class com.baidu.ad.magic.flute.** {*;}
|
||
-keep class com.baidu.mobstat.forbes.** {*;}
|
||
|
||
#ks 不接入ks sdk可以不引入
|
||
-keep class org.chromium.** {*;}
|
||
-keep class org.chromium.** { *; }
|
||
-keep class aegon.chrome.** { *; }
|
||
-keep class com.kwai.**{ *; }
|
||
-dontwarn com.kwai.**
|
||
-dontwarn com.kwad.**
|
||
-dontwarn com.ksad.**
|
||
-dontwarn aegon.chrome.**
|
||
|
||
|
||
#sigmob 不接入sigmob sdk可以不引入
|
||
-dontwarn android.support.v4.**
|
||
-keep class android.support.v4.** { *; }
|
||
-keep interface android.support.v4.** { *; }
|
||
-keep public class * extends android.support.v4.**
|
||
|
||
-dontwarn com.sigmob.**
|
||
-keep class com.sigmob.**.**{*;}
|
||
|
||
#oaid 不同的版本混淆代码不太一致,你注意你接入的oaid版本 ,不接入oaid可以不添加
|
||
-dontwarn com.bun.**
|
||
-keep class com.bun.** {*;}
|
||
-keep class a.**{*;}
|
||
-keep class XI.CA.XI.**{*;}
|
||
-keep class XI.K0.XI.**{*;}
|
||
-keep class XI.XI.K0.**{*;}
|
||
-keep class XI.vs.K0.**{*;}
|
||
-keep class XI.xo.XI.XI.**{*;}
|
||
-keep class com.asus.msa.SupplementaryDID.**{*;}
|
||
-keep class com.asus.msa.sdid.**{*;}
|
||
-keep class com.huawei.hms.ads.identifier.**{*;}
|
||
-keep class com.samsung.android.deviceidservice.**{*;}
|
||
-keep class com.zui.opendeviceidlibrary.**{*;}
|
||
-keep class org.json.**{*;}
|
||
|
||
-dontwarn com.cmic.gen.sdk.**
|
||
-keep class com.cmic.gen.sdk.**{*;}
|
||
-dontwarn com.unicom.online.account.shield.**
|
||
-keep class com.unicom.online.account.shield.** {*;}
|
||
-dontwarn com.unicom.online.account.kernel.**
|
||
-keep class com.unicom.online.account.kernel.** {*;}
|
||
-keep class cn.com.chinatelecom.account.**{*;}
|
||
-keep public class * extends android.view.View
|
||
|
||
#Mintegral 不接入Mintegral sdk,可以不引入
|
||
-keepattributes Signature
|
||
-keepattributes *Annotation*
|
||
-keep class com.mbridge.** {*; }
|
||
-keep interface com.mbridge.** {*; }
|
||
-keep class android.support.v4.** { *; }
|
||
-dontwarn com.mbridge.**
|
||
-keep class **.R$* { public static final int mbridge*; }
|
||
|
||
-keep class com.android.inputmethod.** {*; }
|
||
|
||
|
||
# glide 的混淆代码
|
||
-keep public class * implements com.bumptech.glide.module.GlideModule
|
||
-keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
|
||
**[] $VALUES;
|
||
public *;
|
||
}
|
||
# banner 的混淆代码
|
||
-keep class com.youth.banner.** {
|
||
*;
|
||
}
|
||
-keepattributes Signature
|
||
-keepattributes *Annotation*
|
||
-keep class okhttp3.** { *; }
|
||
-keep interface okhttp3.** { *; }
|
||
-dontwarn okhttp3.**
|
||
|
||
# Platform calls Class.forName on types which do not exist on Android to determine platform.
|
||
-dontnote retrofit2.Platform
|
||
# Platform used when running on RoboVM on iOS.
|
||
-dontnote retrofit2.Platform$IOS$MainThreadExecutor
|
||
# Platform used when running on Java 8 VMs.
|
||
-dontwarn retrofit2.Platform$Java8
|
||
|
||
# Retain generic type information for use by reflection by converters and adapters.
|
||
-keepattributes Signature
|
||
# Retain declared checked exceptions for use by a Proxy instance.
|
||
-keepattributes Exception
|
||
-keep,allowobfuscation,includedescriptorclasses class okhttp3.** { *; }
|
||
-keep,allowobfuscation,includedescriptorclasses interface okhttp3.** { *; }
|
||
-dontwarn okhttp3.**
|
||
# Retrofit 2.x
|
||
-dontwarn retrofit2.**
|
||
-keep class retrofit2.** { *; }
|
||
-keepattributes Signature
|
||
-keepattributes Exceptions
|
||
|
||
#-------------------------------------删除代码区--------------------------------------#
|
||
#删除代码中Log相关的代码
|
||
#-assumenosideeffects class android.util.Log {
|
||
#
|
||
# public static boolean isLoggable(java.lang.String, int);
|
||
# public static int v(...);
|
||
# public static int i(...);
|
||
# public static int w(...);
|
||
# public static int d(...);
|
||
# public static int e(...);
|
||
#} |