proguard-user.txt 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332
  1. #Bugly
  2. -dontwarn com.tencent.bugly.**
  3. -keep public class com.tencent.bugly.**{*;}
  4. #Firebase
  5. # Firebase common rules
  6. -keep class com.google.firebase.** { *; }
  7. -dontwarn com.google.firebase.**
  8. # Firebase Database
  9. -keep class com.google.firebase.database.** { *; }
  10. -dontwarn com.google.firebase.database.**
  11. # Firebase Auth
  12. -keep class com.google.firebase.auth.** { *; }
  13. -dontwarn com.google.firebase.auth.**
  14. # Firebase Cloud Messaging (FCM)
  15. -keep class com.google.firebase.messaging.** { *; }
  16. -dontwarn com.google.firebase.messaging.**
  17. # Firebase Analytics
  18. -keep class com.google.android.gms.measurement.** { *; }
  19. -keep class com.google.firebase.analytics.** { *; }
  20. -dontwarn com.google.android.gms.measurement.**
  21. -dontwarn com.google.firebase.analytics.**
  22. # Google Play Services (common for all Google services including Firebase)
  23. -keep class com.google.android.gms.** { *; }
  24. -dontwarn com.google.android.gms.**
  25. #Facebook
  26. #talkingdata
  27. -keep class com.tendcloud.tenddata.** {*;}
  28. -keep class com.tendcloud.** {*;}
  29. -keep public class com.tendcloud.tenddata.** { public protected *;}
  30. -keepclassmembers class com.tendcloud.tenddata.**{
  31. public void *(***);
  32. }
  33. # google mobile ads
  34. -keepclassmembers class * implements android.os.Parcelable {
  35. public static final android.os.Parcelable$Creator *;
  36. }
  37. #noinspection ShrinkerUnresolvedReference
  38. #unity
  39. -keep class com.google.android.ump.** {public *;}
  40. -keep class com.google.android.gms.ads.** {public *;}
  41. -keep class com.google.android.gms.appset.** { *; }
  42. -keep class com.google.android.gms.tasks.** { *; }
  43. #adapters
  44. -keep class com.ironsource.adapters.** { *; }
  45. #sdk
  46. -dontwarn com.ironsource.**
  47. -dontwarn com.ironsource.adapters.**
  48. -keepclassmembers class com.ironsource.** { public *; }
  49. -keep public class com.ironsource.**
  50. -keep class com.ironsource.adapters.** { *;
  51. }
  52. #omid
  53. -dontwarn com.iab.omid.**
  54. -keep class com.iab.omid.** {*;}
  55. #javascript
  56. -keepattributes JavascriptInterface
  57. -keepclassmembers class * { @android.webkit.JavascriptInterface <methods>; }
  58. #For AmazonAps integration
  59. -keep class com.amazon.device.ads.DtbThreadService {
  60. static *;
  61. }
  62. -keep public interface com.amazon.device.ads** {*; }
  63. #For AppLovin integration
  64. -keepclassmembers class com.applovin.sdk.AppLovinSdk {
  65. static *;
  66. }
  67. -keep public interface com.applovin.sdk** {*; }
  68. -keep public interface com.applovin.adview** {*; }
  69. -keep public interface com.applovin.mediation** {*; }
  70. -keep public interface com.applovin.communicator** {*; }
  71. #For Bytedance integration
  72. -keep public interface com.bytedance.sdk.openadsdk** {*; }
  73. #For Facebook integration
  74. -keepclassmembers class com.facebook.ads.internal.AdSdkVersion {
  75. static *;
  76. }
  77. -keepclassmembers class com.facebook.ads.internal.settings.AdSdkVersion {
  78. static *;
  79. }
  80. -keepclassmembers class com.facebook.ads.BuildConfig {
  81. static *;
  82. }
  83. -keep public interface com.facebook.ads** {*; }
  84. #For Fairbid
  85. -keep public interface com.fyber.fairbid.ads.interstitial** {*; }
  86. -keep public interface com.fyber.fairbid.ads.rewarded** {*; }
  87. -keep class com.fyber.offerwall.*
  88. #For Fivead
  89. -keep public interface com.five_corp.ad** {*; }
  90. #For Fyber(Inneractive) integration
  91. -keep public interface com.fyber.inneractive.sdk.external** {*; }
  92. -keep public interface com.fyber.inneractive.sdk.activities** {*; }
  93. -keep public interface com.fyber.inneractive.sdk.ui** {*; }
  94. #For HyprMX integration
  95. -keepclassmembers class com.hyprmx.android.sdk.utility.HyprMXProperties {
  96. static *;
  97. }
  98. -keepclassmembers class com.hyprmx.android.BuildConfig {
  99. static *;
  100. }
  101. -keep public interface com.hyprmx.android.sdk.activity** {*; }
  102. -keep public interface com.hyprmx.android.sdk.graphics** {*; }
  103. # For Inmobi integration
  104. -keep class com.inmobi.*
  105. -keep public interface com.inmobi.ads.listeners** {*; }
  106. -keep public interface com.inmobi.ads.InMobiInterstitial** {*; }
  107. -keep public interface com.inmobi.ads.InMobiBanner** {*; }
  108. # For ironSource integration
  109. -keep public interface com.ironsource.mediationsdk.sdk** {*; }
  110. -keep public interface com.ironsource.mediationsdk.impressionData.ImpressionDataListener {*; }
  111. #For Maio integration
  112. -keep public interface jp.maio.sdk.android.MaioAdsListenerInterface {*; }
  113. # For Mintergral integration
  114. -keep public interface com.mbridge.msdk.out** {*; }
  115. -keep public interface com.mbridge.msdk.videocommon.listener** {*; }
  116. -keep public interface com.mbridge.msdk.interstitialvideo.out** {*; }
  117. -keep public interface com.mintegral.msdk.out** {*; }
  118. -keep public interface com.mintegral.msdk.videocommon.listener** {*; }
  119. -keep public interface com.mintegral.msdk.interstitialvideo.out** {*; }
  120. #For MyTarget integration
  121. -keep class com.my.target.** {*;}
  122. #For Ogury integration
  123. -keep public interface io.presage.interstitial** {*; }
  124. -keep public interface io.presage.interstitial.PresageInterstitialCallback {*; }
  125. #For Pubnative integration
  126. -keep public interface net.pubnative.lite.sdk.interstitial.HyBidInterstitialAd** {*; }
  127. -keep public interface net.pubnative.lite.sdk.rewarded.HyBidRewardedAd** {*; }
  128. -keep public interface net.pubnative.lite.sdk.views.HyBidAdView** {*; }
  129. #For Smaato integration
  130. -keep public interface com.smaato.sdk.interstitial** {*; }
  131. -keep public interface com.smaato.sdk.video.vast** {*; }
  132. -keep public interface com.smaato.sdk.banner.widget** {*; }
  133. -keep public interface com.smaato.sdk.core.util** {*; }
  134. # For Tapjoy integration
  135. -keep public interface com.tapjoy.** {*; }
  136. # For Tencent integration
  137. -keep public interface com.qq.e.ads.interstitial2** {*; }
  138. -keep public interface com.qq.e.ads.interstitial3** {*; }
  139. -keep public interface com.qq.e.ads.rewardvideo** {*; }
  140. -keep public interface com.qq.e.ads.rewardvideo2** {*; }
  141. -keep public interface com.qq.e.ads.banner2** {*; }
  142. -keep public interface com.qq.e.comm.adevent** {*; }
  143. #For Verizon integration
  144. -keepclassmembers class com.verizon.ads.edition.BuildConfig {
  145. static *;
  146. }
  147. -keep public interface com.verizon.ads.interstitialplacement** {*; }
  148. -keep public interface com.verizon.ads.inlineplacement** {*; }
  149. -keep public interface com.verizon.ads.vastcontroller** {*; }
  150. -keep public interface com.verizon.ads.webcontroller** {*; }
  151. #For Vungle integration
  152. -keep public interface com.vungle.warren.PlayAdCallback {*; }
  153. -keep public interface com.vungle.warren.ui.contract** {*; }
  154. -keep public interface com.vungle.warren.ui.view** {*; }
  155. #For AndroidX
  156. -keep class androidx.localbroadcastmanager.content.LocalBroadcastManager { *;}
  157. -keep class androidx.recyclerview.widget.RecyclerView { *;}
  158. -keep class androidx.recyclerview.widget.RecyclerView$OnScrollListener { *;}
  159. #For Android
  160. -keep class * extends android.app.Activity
  161. # 代码混淆压缩比,在0和7之间,默认为5,一般不需要改
  162. -optimizationpasses 5
  163. # 混淆时不使用大小写混合,混淆后的类名为小写
  164. -dontusemixedcaseclassnames
  165. #指定不去忽略非公共的库类
  166. -dontskipnonpubliclibraryclasses
  167. # 指定不去忽略非公共的库的类的成员
  168. -dontskipnonpubliclibraryclassmembers
  169. # 不做预校验,preverify是proguard的4个步骤之一
  170. # Android不需要preverify,去掉这一步可加快混淆速度
  171. #-dontpreverify
  172. # 不优化输入的类文件
  173. -dontoptimize
  174. # 打包时忽略警告
  175. -ignorewarnings
  176. # 有了verbose这句话,混淆后就会生成映射文件
  177. # 包含有类名->混淆后类名的映射关系
  178. # 然后使用printmapping指定映射文件的名称
  179. -verbose
  180. -printmapping proguardMapping.txt
  181. # 指定混淆时采用的算法,后面的参数是一个过滤器
  182. # 这个过滤器是谷歌推荐的算法,一般不改变
  183. -optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
  184. #保护内部类
  185. -keepattributes Exceptions,InnerClasses,Signature,Deprecated,SourceFile,LineNumberTable,*Annotation*,EnclosingMethod
  186. # ironsource
  187. -keepclassmembers class com.ironsource.sdk.controller.IronSourceWebView$JSInterface {
  188. public *;
  189. }
  190. -keepclassmembers class * implements android.os.Parcelable {
  191. public static final android.os.Parcelable$Creator *;
  192. }
  193. -keep public class com.google.android.gms.ads.** {
  194. public *;
  195. }
  196. -keep class com.ironsource.adapters.** { *;
  197. }
  198. -keep class com.ironsource.unity.androidbridge.** { *;
  199. }
  200. -dontwarn com.ironsource.mediationsdk.**
  201. -dontwarn com.ironsource.adapters.**
  202. -keepattributes JavascriptInterface
  203. -keepclassmembers class * {
  204. @android.webkit.JavascriptInterface <methods>;
  205. }
  206. #facebook
  207. -keep class com.facebook.** { *; }
  208. # adjust
  209. -keep class com.adjust.sdk.** { *; }
  210. -keep class com.google.android.gms.common.ConnectionResult {
  211. int SUCCESS;
  212. }
  213. -keep class com.google.android.gms.ads.identifier.AdvertisingIdClient {
  214. com.google.android.gms.ads.identifier.AdvertisingIdClient$Info getAdvertisingIdInfo(android.content.Context);
  215. }
  216. -keep class com.google.android.gms.ads.identifier.AdvertisingIdClient$Info {
  217. java.lang.String getId();
  218. boolean isLimitAdTrackingEnabled();
  219. }
  220. -keep public class com.android.installreferrer.** { *; }
  221. #radio
  222. -keep class com.free.gun.shooter.snipershooting.** { *; }
  223. -keep class org.apache.http.** { *; }
  224. -dontwarn android.support.v4.**
  225. -keep class android.support.v4.** { *; }
  226. -keep interface android.support.v4.app.** { *; }
  227. -keep public class * extends android.support.v4.**
  228. -keep public class * extends android.app.Fragment
  229. # 保留了继承自Activity、Application这些类的子类
  230. # 因为这些子类,都有可能被外部调用
  231. -keep public class * extends android.app.Activity
  232. -keep public class * extends android.app.Application
  233. -keep public class * extends android.app.Service
  234. -keep public class * extends android.content.BroadcastReceiver
  235. -keep public class * extends android.content.ContentProvider
  236. -keep public class * extends android.app.backup.BackupAgentHelper
  237. -keep public class * extends android.preference.Preference
  238. -keep public class * extends android.view.View
  239. -keep public class com.android.vending.licensing.ILicensingService
  240. # 保留在Activity中的方法参数是view的方法,
  241. # 从而我们在layout里面编写onClick就不会被影响
  242. -keepclassmembers class * extends android.app.Activity {
  243. public void *(android.view.View);
  244. }
  245. # 枚举类不能被混淆
  246. -keepclassmembers enum * {
  247. public static **[] values();
  248. public static ** valueOf(java.lang.String);
  249. }
  250. # 保留自定义控件(继承自View)不被混淆
  251. -keep public class * extends android.view.View {
  252. *** get*();
  253. void set*(***);
  254. public <init>(android.content.Context);
  255. public <init>(android.content.Context, android.util.AttributeSet);
  256. public <init>(android.content.Context, android.util.AttributeSet, int);
  257. }
  258. # 保留Serializable序列化的类不被混淆
  259. -keepclassmembers class * implements java.io.Serializable {
  260. static final long serialVersionUID;
  261. private static final java.io.ObjectStreamField[] serialPersistentFields;
  262. private void writeObject(java.io.ObjectOutputStream);
  263. private void readObject(java.io.ObjectInputStream);
  264. java.lang.Object writeReplace();
  265. java.lang.Object readResolve();
  266. }
  267. # 对于R(资源)下的所有类及其方法,都不能被混淆
  268. -keep class **.R$* {
  269. *;
  270. }
  271. # 对于带有回调函数onXXEvent的,不能被混淆
  272. -keepclassmembers class * {
  273. void *(**On*Event);
  274. }
  275. # For UnityAds
  276. -keepattributes JavascriptInterface
  277. -keep class android.webkit.JavascriptInterface {
  278. *;
  279. }
  280. -keep class com.unity3d.** {
  281. *;
  282. }
  283. -keep class com.bytedance.sdk.openadsdk.** {*;}
  284. -keep public interface com.bytedance.sdk.openadsdk.downloadnew.** {*;}
  285. -keep class com.ss.sys.ces.* {*;}
  286. #以下类是原生广告的自定义java类,需要keep住,开发者自实现时,也需要keep住。
  287. -keep class com.bytedance.android.NativeAdManager {*;}
  288. -keep class com.bytedance.android.IntersititialView {*;}
  289. -keep class com.bytedance.android.BannerView {*;}
  290. #黑名单
  291. -keep class com.unitoolkit.** { *; }