123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332 |
- #Bugly
- -dontwarn com.tencent.bugly.**
- -keep public class com.tencent.bugly.**{*;}
- #Firebase
- # Firebase common rules
- -keep class com.google.firebase.** { *; }
- -dontwarn com.google.firebase.**
- # Firebase Database
- -keep class com.google.firebase.database.** { *; }
- -dontwarn com.google.firebase.database.**
- # Firebase Auth
- -keep class com.google.firebase.auth.** { *; }
- -dontwarn com.google.firebase.auth.**
- # Firebase Cloud Messaging (FCM)
- -keep class com.google.firebase.messaging.** { *; }
- -dontwarn com.google.firebase.messaging.**
- # Firebase Analytics
- -keep class com.google.android.gms.measurement.** { *; }
- -keep class com.google.firebase.analytics.** { *; }
- -dontwarn com.google.android.gms.measurement.**
- -dontwarn com.google.firebase.analytics.**
- # Google Play Services (common for all Google services including Firebase)
- -keep class com.google.android.gms.** { *; }
- -dontwarn com.google.android.gms.**
- #Facebook
- #talkingdata
- -keep class com.tendcloud.tenddata.** {*;}
- -keep class com.tendcloud.** {*;}
- -keep public class com.tendcloud.tenddata.** { public protected *;}
- -keepclassmembers class com.tendcloud.tenddata.**{
- public void *(***);
- }
- # google mobile ads
- -keepclassmembers class * implements android.os.Parcelable {
- public static final android.os.Parcelable$Creator *;
- }
- #noinspection ShrinkerUnresolvedReference
- #unity
- -keep class com.google.android.ump.** {public *;}
- -keep class com.google.android.gms.ads.** {public *;}
- -keep class com.google.android.gms.appset.** { *; }
- -keep class com.google.android.gms.tasks.** { *; }
- #adapters
- -keep class com.ironsource.adapters.** { *; }
- #sdk
- -dontwarn com.ironsource.**
- -dontwarn com.ironsource.adapters.**
- -keepclassmembers class com.ironsource.** { public *; }
- -keep public class com.ironsource.**
- -keep class com.ironsource.adapters.** { *;
- }
- #omid
- -dontwarn com.iab.omid.**
- -keep class com.iab.omid.** {*;}
- #javascript
- -keepattributes JavascriptInterface
- -keepclassmembers class * { @android.webkit.JavascriptInterface <methods>; }
- #For AmazonAps integration
- -keep class com.amazon.device.ads.DtbThreadService {
- static *;
- }
- -keep public interface com.amazon.device.ads** {*; }
- #For AppLovin integration
- -keepclassmembers class com.applovin.sdk.AppLovinSdk {
- static *;
- }
- -keep public interface com.applovin.sdk** {*; }
- -keep public interface com.applovin.adview** {*; }
- -keep public interface com.applovin.mediation** {*; }
- -keep public interface com.applovin.communicator** {*; }
- #For Bytedance integration
- -keep public interface com.bytedance.sdk.openadsdk** {*; }
- #For Facebook integration
- -keepclassmembers class com.facebook.ads.internal.AdSdkVersion {
- static *;
- }
- -keepclassmembers class com.facebook.ads.internal.settings.AdSdkVersion {
- static *;
- }
- -keepclassmembers class com.facebook.ads.BuildConfig {
- static *;
- }
- -keep public interface com.facebook.ads** {*; }
- #For Fairbid
- -keep public interface com.fyber.fairbid.ads.interstitial** {*; }
- -keep public interface com.fyber.fairbid.ads.rewarded** {*; }
- -keep class com.fyber.offerwall.*
- #For Fivead
- -keep public interface com.five_corp.ad** {*; }
- #For Fyber(Inneractive) integration
- -keep public interface com.fyber.inneractive.sdk.external** {*; }
- -keep public interface com.fyber.inneractive.sdk.activities** {*; }
- -keep public interface com.fyber.inneractive.sdk.ui** {*; }
- #For HyprMX integration
- -keepclassmembers class com.hyprmx.android.sdk.utility.HyprMXProperties {
- static *;
- }
- -keepclassmembers class com.hyprmx.android.BuildConfig {
- static *;
- }
- -keep public interface com.hyprmx.android.sdk.activity** {*; }
- -keep public interface com.hyprmx.android.sdk.graphics** {*; }
- # For Inmobi integration
- -keep class com.inmobi.*
- -keep public interface com.inmobi.ads.listeners** {*; }
- -keep public interface com.inmobi.ads.InMobiInterstitial** {*; }
- -keep public interface com.inmobi.ads.InMobiBanner** {*; }
- # For ironSource integration
- -keep public interface com.ironsource.mediationsdk.sdk** {*; }
- -keep public interface com.ironsource.mediationsdk.impressionData.ImpressionDataListener {*; }
- #For Maio integration
- -keep public interface jp.maio.sdk.android.MaioAdsListenerInterface {*; }
- # For Mintergral integration
- -keep public interface com.mbridge.msdk.out** {*; }
- -keep public interface com.mbridge.msdk.videocommon.listener** {*; }
- -keep public interface com.mbridge.msdk.interstitialvideo.out** {*; }
- -keep public interface com.mintegral.msdk.out** {*; }
- -keep public interface com.mintegral.msdk.videocommon.listener** {*; }
- -keep public interface com.mintegral.msdk.interstitialvideo.out** {*; }
- #For MyTarget integration
- -keep class com.my.target.** {*;}
- #For Ogury integration
- -keep public interface io.presage.interstitial** {*; }
- -keep public interface io.presage.interstitial.PresageInterstitialCallback {*; }
- #For Pubnative integration
- -keep public interface net.pubnative.lite.sdk.interstitial.HyBidInterstitialAd** {*; }
- -keep public interface net.pubnative.lite.sdk.rewarded.HyBidRewardedAd** {*; }
- -keep public interface net.pubnative.lite.sdk.views.HyBidAdView** {*; }
- #For Smaato integration
- -keep public interface com.smaato.sdk.interstitial** {*; }
- -keep public interface com.smaato.sdk.video.vast** {*; }
- -keep public interface com.smaato.sdk.banner.widget** {*; }
- -keep public interface com.smaato.sdk.core.util** {*; }
- # For Tapjoy integration
- -keep public interface com.tapjoy.** {*; }
- # For Tencent integration
- -keep public interface com.qq.e.ads.interstitial2** {*; }
- -keep public interface com.qq.e.ads.interstitial3** {*; }
- -keep public interface com.qq.e.ads.rewardvideo** {*; }
- -keep public interface com.qq.e.ads.rewardvideo2** {*; }
- -keep public interface com.qq.e.ads.banner2** {*; }
- -keep public interface com.qq.e.comm.adevent** {*; }
- #For Verizon integration
- -keepclassmembers class com.verizon.ads.edition.BuildConfig {
- static *;
- }
- -keep public interface com.verizon.ads.interstitialplacement** {*; }
- -keep public interface com.verizon.ads.inlineplacement** {*; }
- -keep public interface com.verizon.ads.vastcontroller** {*; }
- -keep public interface com.verizon.ads.webcontroller** {*; }
- #For Vungle integration
- -keep public interface com.vungle.warren.PlayAdCallback {*; }
- -keep public interface com.vungle.warren.ui.contract** {*; }
- -keep public interface com.vungle.warren.ui.view** {*; }
- #For AndroidX
- -keep class androidx.localbroadcastmanager.content.LocalBroadcastManager { *;}
- -keep class androidx.recyclerview.widget.RecyclerView { *;}
- -keep class androidx.recyclerview.widget.RecyclerView$OnScrollListener { *;}
- #For Android
- -keep class * extends android.app.Activity
- # 代码混淆压缩比,在0和7之间,默认为5,一般不需要改
- -optimizationpasses 5
- # 混淆时不使用大小写混合,混淆后的类名为小写
- -dontusemixedcaseclassnames
- #指定不去忽略非公共的库类
- -dontskipnonpubliclibraryclasses
- # 指定不去忽略非公共的库的类的成员
- -dontskipnonpubliclibraryclassmembers
- # 不做预校验,preverify是proguard的4个步骤之一
- # Android不需要preverify,去掉这一步可加快混淆速度
- #-dontpreverify
- # 不优化输入的类文件
- -dontoptimize
- # 打包时忽略警告
- -ignorewarnings
- # 有了verbose这句话,混淆后就会生成映射文件
- # 包含有类名->混淆后类名的映射关系
- # 然后使用printmapping指定映射文件的名称
- -verbose
- -printmapping proguardMapping.txt
- # 指定混淆时采用的算法,后面的参数是一个过滤器
- # 这个过滤器是谷歌推荐的算法,一般不改变
- -optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
- #保护内部类
- -keepattributes Exceptions,InnerClasses,Signature,Deprecated,SourceFile,LineNumberTable,*Annotation*,EnclosingMethod
- # ironsource
- -keepclassmembers class com.ironsource.sdk.controller.IronSourceWebView$JSInterface {
- public *;
- }
- -keepclassmembers class * implements android.os.Parcelable {
- public static final android.os.Parcelable$Creator *;
- }
- -keep public class com.google.android.gms.ads.** {
- public *;
- }
- -keep class com.ironsource.adapters.** { *;
- }
- -keep class com.ironsource.unity.androidbridge.** { *;
- }
- -dontwarn com.ironsource.mediationsdk.**
- -dontwarn com.ironsource.adapters.**
- -keepattributes JavascriptInterface
- -keepclassmembers class * {
- @android.webkit.JavascriptInterface <methods>;
- }
- #facebook
- -keep class com.facebook.** { *; }
- # adjust
- -keep class com.adjust.sdk.** { *; }
- -keep class com.google.android.gms.common.ConnectionResult {
- int SUCCESS;
- }
- -keep class com.google.android.gms.ads.identifier.AdvertisingIdClient {
- com.google.android.gms.ads.identifier.AdvertisingIdClient$Info getAdvertisingIdInfo(android.content.Context);
- }
- -keep class com.google.android.gms.ads.identifier.AdvertisingIdClient$Info {
- java.lang.String getId();
- boolean isLimitAdTrackingEnabled();
- }
- -keep public class com.android.installreferrer.** { *; }
- #radio
- -keep class com.free.gun.shooter.snipershooting.** { *; }
- -keep class org.apache.http.** { *; }
- -dontwarn android.support.v4.**
- -keep class android.support.v4.** { *; }
- -keep interface android.support.v4.app.** { *; }
- -keep public class * extends android.support.v4.**
- -keep public class * extends android.app.Fragment
- # 保留了继承自Activity、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.app.backup.BackupAgentHelper
- -keep public class * extends android.preference.Preference
- -keep public class * extends android.view.View
- -keep public class com.android.vending.licensing.ILicensingService
- # 保留在Activity中的方法参数是view的方法,
- # 从而我们在layout里面编写onClick就不会被影响
- -keepclassmembers class * extends android.app.Activity {
- public void *(android.view.View);
- }
- # 枚举类不能被混淆
- -keepclassmembers enum * {
- public static **[] values();
- public static ** valueOf(java.lang.String);
- }
- # 保留自定义控件(继承自View)不被混淆
- -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);
- }
- # 保留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();
- }
- # 对于R(资源)下的所有类及其方法,都不能被混淆
- -keep class **.R$* {
- *;
- }
- # 对于带有回调函数onXXEvent的,不能被混淆
- -keepclassmembers class * {
- void *(**On*Event);
- }
- # For UnityAds
- -keepattributes JavascriptInterface
- -keep class android.webkit.JavascriptInterface {
- *;
- }
- -keep class com.unity3d.** {
- *;
- }
- -keep class com.bytedance.sdk.openadsdk.** {*;}
- -keep public interface com.bytedance.sdk.openadsdk.downloadnew.** {*;}
- -keep class com.ss.sys.ces.* {*;}
- #以下类是原生广告的自定义java类,需要keep住,开发者自实现时,也需要keep住。
- -keep class com.bytedance.android.NativeAdManager {*;}
- -keep class com.bytedance.android.IntersititialView {*;}
- -keep class com.bytedance.android.BannerView {*;}
- #黑名单
- -keep class com.unitoolkit.** { *; }
|