proguard-rules.pro 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439
  1. # Add project specific ProGuard rules here.
  2. # You can control the set of applied configuration files using the
  3. # proguardFiles setting in build.gradle.
  4. #
  5. # For more details, see
  6. # http://developer.android.com/guide/developing/tools/proguard.html
  7. # If your project uses WebView with JS, uncomment the following
  8. # and specify the fully qualified class name to the JavaScript interface
  9. # class:
  10. #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
  11. # public *;
  12. #}
  13. # Uncomment this to preserve the line number information for
  14. # debugging stack traces.
  15. #-keepattributes SourceFile,LineNumberTable
  16. # If you keep the line number information, uncomment this to
  17. # hide the original source file name.
  18. #-renamesourcefileattribute SourceFile
  19. -optimizationpasses 5
  20. -dontusemixedcaseclassnames
  21. -dontskipnonpubliclibraryclasses
  22. -dontskipnonpubliclibraryclassmembers
  23. -dontpreverify
  24. -verbose
  25. -ignorewarnings
  26. -optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
  27. -keepattributes EnclosingMethod
  28. -keepattributes SourceFile,LineNumberTable
  29. -keepattributes Exceptions,InnerClasses,Signature,Deprecated,SourceFile,LineNumberTable,*Annotation*,EnclosingMethod
  30. -keep public class * extends android.app.Activity
  31. -keep public class * extends android.app.Application
  32. -keep public class * extends android.app.Service
  33. -keep public class * extends android.app.IntentService
  34. -keep public class * extends android.content.BroadcastReceiver
  35. -keep public class * extends android.content.ContentProvider
  36. -keep public class com.android.vending.licensing.ILicensingService
  37. -keep public class * extends android.app.backup.BackupAgentHelper
  38. -keep public class * extends android.view.View
  39. -keepattributes *Annotation*
  40. -keep public class * extends android.app.backup.BackupAgent
  41. -keep public class * extends android.preference.Preference
  42. -keep public class * extends android.app.Fragment
  43. -keep public class * extends androidx.fragment.app.**
  44. -keep public class * extends android.support.v4.**
  45. -keep public class * extends android.support.v7.**
  46. -keep public class * extends android.support.annotation.**
  47. -keep public class * extends androidx.lifecycle.**
  48. # 保留support下的所有类及其内部类
  49. -keep class android.support.** {*;}
  50. #Base
  51. -keep class com.kalacheng.commonview.bean.*{*;}
  52. -keep class * extends com.kalacheng.base.base.BaseFragment { *; }
  53. -keep class * extends com.kalacheng.base.base.BaseMVVMFragment { *; }
  54. -keep class * extends com.kalacheng.base.base.BaseViewHolder { *; }
  55. -keep class * extends com.kalacheng.base.base.BaseMVVMViewHolder { *; }
  56. #Beans
  57. -keep class com.kalacheng.baseLive.**{*;}
  58. -keep class com.kalacheng.busappsupport.**{*;}
  59. -keep class com.kalacheng.busbasconfig.**{*;}
  60. -keep class com.kalacheng.busblindbox.**{*;}
  61. -keep class com.kalacheng.buschatroom.**{*;}
  62. -keep class com.kalacheng.buscommon.**{*;}
  63. -keep class com.kalacheng.busdynamiccircle.**{*;}
  64. -keep class com.kalacheng.busfinance.**{*;}
  65. -keep class com.kalacheng.busgame.**{*;}
  66. -keep class com.kalacheng.busgraderight.**{*;}
  67. -keep class com.kalacheng.buslive.**{*;}
  68. -keep class com.kalacheng.buslivebas.**{*;}
  69. -keep class com.kalacheng.busliveplugin.**{*;}
  70. -keep class com.kalacheng.busmsgcenter.**{*;}
  71. -keep class com.kalacheng.busnobility.**{*;}
  72. -keep class com.kalacheng.busooolive.**{*;}
  73. -keep class com.kalacheng.busoperation.**{*;}
  74. -keep class com.kalacheng.buspersonalcenter.**{*;}
  75. -keep class com.kalacheng.busplugin.**{*;}
  76. -keep class com.kalacheng.busseek.**{*;}
  77. -keep class com.kalacheng.busshop.**{*;}
  78. -keep class com.kalacheng.busshortvideo.**{*;}
  79. -keep class com.kalacheng.bususer.**{*;}
  80. -keep class com.kalacheng.busvoicelive.**{*;}
  81. -keep class com.kalacheng.finance.**{*;}
  82. -keep class com.kalacheng.game.**{*;}
  83. -keep class com.kalacheng.libbas.**{*;}
  84. -keep class com.kalacheng.libuser.**{*;}
  85. -keep class com.kalacheng.shop.**{*;}
  86. -keep class com.kalacheng.shortvideo.**{*;}
  87. -keep class com.kalacheng.template.**{*;}
  88. #直播购添加地址对象
  89. -keep class com.kalacheng.shopping.buyer.bean.AddressBean{*;}
  90. -keep class com.kalacheng.shopping.buyer.bean.AddressBean$CitiesBean{*;}
  91. -keep class com.kalacheng.shopping.buyer.bean.AddressBean$CitiesBean$CountiesBean{*;}
  92. #消息
  93. -keep class com.kalacheng.message.bean.*{*;}
  94. -keep class com.kalacheng.imjmessage.bean.*{*;}
  95. -keep class com.kalacheng.imjmessage.event.*{*;}
  96. #地图
  97. -keep class com.kalacheng.map.bean.*{*;}
  98. #glide
  99. -dontwarn com.bumptech.glide.**
  100. #知乎Matisse额外规则
  101. -dontwarn com.squareup.picasso.**
  102. -keep class com.zhihu.matisse.**{*;}
  103. #微信开放平台
  104. -keep class com.tencent.mm.opensdk.** {
  105. *;
  106. }
  107. -keep class com.tencent.wxop.** {
  108. *;
  109. }
  110. -keep class com.tencent.mm.sdk.** {
  111. *;
  112. }
  113. #ucrop
  114. -dontwarn com.yalantis.ucrop**
  115. -keep class com.yalantis.ucrop** { *; }
  116. -keep interface com.yalantis.ucrop** { *; }
  117. #腾讯实时音视频
  118. -keep class com.tencent.**{*;}
  119. -dontwarn com.tencent.**
  120. -keep class tencent.**{*;}
  121. -dontwarn tencent.**
  122. -keep class qalsdk.**{*;}
  123. -dontwarn qalsdk.**
  124. #支付宝支付
  125. -keep class com.alipay.android.app.IAlixPay{*;}
  126. -keep class com.alipay.android.app.IAlixPay$Stub{*;}
  127. -keep class com.alipay.android.app.IRemoteServiceCallback{*;}
  128. -keep class com.alipay.android.app.IRemoteServiceCallback$Stub{*;}
  129. -keep class com.alipay.sdk.app.PayTask{ public *;}
  130. -keep class com.alipay.sdk.app.AuthTask{ public *;}
  131. -keep class com.alipay.sdk.app.H5PayCallback {
  132. <fields>;
  133. <methods>;
  134. }
  135. -keep class com.alipay.android.phone.mrpc.core.** { *; }
  136. -keep class com.alipay.apmobilesecuritysdk.** { *; }
  137. -keep class com.alipay.mobile.framework.service.annotation.** { *; }
  138. -keep class com.alipay.mobilesecuritysdk.face.** { *; }
  139. -keep class com.alipay.tscenter.biz.rpc.** { *; }
  140. -keep class org.json.alipay.** { *; }
  141. -keep class com.alipay.tscenter.** { *; }
  142. -keep class com.ta.utdid2.** { *;}
  143. -keep class com.ut.device.** { *;}
  144. #Mina
  145. -keep class org.apache.mina.** { *; }
  146. -keep class org.slf4j.** { *; }
  147. #Socket
  148. -keep class com.wengying666.imsocket.** { *; }
  149. #极光
  150. -dontoptimize
  151. -dontpreverify
  152. -dontwarn cn.jpush.**
  153. -keep class cn.jpush.** { *; }
  154. -keep class * extends cn.jpush.android.helpers.JPushMessageReceiver { *; }
  155. -dontwarn cn.jiguang.**
  156. -keep class cn.jiguang.** { *; }
  157. #极光im --- start----
  158. -keepattributes EnclosingMethod,Signature
  159. -dontwarn cn.jpush.**
  160. -keep class cn.jpush.** { *; }
  161. -dontwarn cn.jiguang.**
  162. -keep class cn.jiguang.** { *; }
  163. -dontwarn cn.jmessage.**
  164. -keep class cn.jmessage.**{ *; }
  165. -keepclassmembers class ** {
  166. public void onEvent*(**);
  167. }
  168. #极光认证
  169. -dontwarn cn.com.chinatelecom.**
  170. -keep class cn.com.chinatelecom.** { *; }
  171. -dontwarn com.ct.**
  172. -keep class com.ct.** { *; }
  173. -dontwarn a.a.**
  174. -keep class a.a.** { *; }
  175. -dontwarn com.cmic.**
  176. -keep class com.cmic.** { *; }
  177. -dontwarn com.unicom.**
  178. -keep class com.unicom.** { *; }
  179. -dontwarn com.sdk.**
  180. -keep class com.sdk.** { *; }
  181. -dontwarn com.sdk.**
  182. -keep class com.sdk.** { *; }
  183. #========================gson================================
  184. -dontwarn com.google.**
  185. -keep class com.google.gson.** {*;}
  186. #========================protobuf================================
  187. -keep class com.google.protobuf.** {*;}
  188. #极光im --- end----
  189. #Bugly
  190. -dontwarn com.tencent.bugly.**
  191. -keep public class com.tencent.bugly.**{*;}
  192. #JobService
  193. -keep public class * extends android.app.job.JobService
  194. #MTA
  195. -keep class com.tencent.stat.*{*;}
  196. -keep class com.tencent.mid.*{*;}
  197. #枚举
  198. -keepclassmembers enum * {
  199. public static **[] values();
  200. public static ** valueOf(java.lang.String);
  201. }
  202. #高德地图 3D 地图 V5.0.0之后:
  203. -keep class com.amap.api.maps.**{*;}
  204. -keep class com.autonavi.**{*;}
  205. -keep class com.amap.api.trace.**{*;}
  206. #定位
  207. -keep class com.amap.api.location.**{*;}
  208. -keep class com.amap.api.fence.**{*;}
  209. -keep class com.autonavi.aps.amapapi.model.**{*;}
  210. #美颜
  211. -keep class cn.tillusory.**{*;}
  212. -keep class com.hwangjr.**{*;}
  213. -keep class rx.**{*;}
  214. #mob
  215. -keep class cn.sharesdk.**{*;}
  216. -keep class com.sina.**{*;}
  217. -keep class **.R$* {*;}
  218. -keep class **.R{*;}
  219. -keep class com.mob.**{*;}
  220. -keep class m.framework.**{*;}
  221. -keep class com.bytedance.**{*;}
  222. -dontwarn cn.sharesdk.**
  223. -dontwarn com.sina.**
  224. -dontwarn com.mob.**
  225. -dontwarn **.R$*
  226. #Parcelable
  227. -keep class * implements android.os.Parcelable {
  228. public static final android.os.Parcelable$Creator *;
  229. }
  230. # 保留Serializable序列化的类不被混淆
  231. -keepclassmembers class * implements java.io.Serializable {
  232. static final long serialVersionUID;
  233. private static final java.io.ObjectStreamField[] serialPersistentFields;
  234. !static !transient <fields>;
  235. !private <fields>;
  236. !private <methods>;
  237. private void writeObject(java.io.ObjectOutputStream);
  238. private void readObject(java.io.ObjectInputStream);
  239. java.lang.Object writeReplace();
  240. java.lang.Object readResolve();
  241. }
  242. -keepclassmembers class * {
  243. @org.greenrobot.eventbus.Subscribe <methods>;
  244. }
  245. -keep enum org.greenrobot.eventbus.ThreadMode { *; }
  246. # Only required if you use AsyncExecutor
  247. -keepclassmembers class * extends org.greenrobot.eventbus.util.ThrowableFailureEvent {
  248. <init>(java.lang.Throwable);
  249. }
  250. #ARouter
  251. -keep public class com.alibaba.android.arouter.routes.**{*;}
  252. -keep public class com.alibaba.android.arouter.facade.**{*;}
  253. -keep class * implements com.alibaba.android.arouter.facade.template.ISyringe{*;}
  254. # If you use the byType method to obtain Service, add the following rules to protect the interface:
  255. -keep interface * implements com.alibaba.android.arouter.facade.template.IProvider
  256. # If single-type injection is used, that is, no interface is defined to implement IProvider, the following rules need to be added to protect the implementation
  257. #-keep class * implements com.alibaba.android.arouter.facade.template.IProvider
  258. #MVVM
  259. -keep class **.*Binding {*;}
  260. -keep class **.*BindingImpl {*;}
  261. #rxjava rxandroid
  262. -dontwarn sun.misc.**
  263. -keepclassmembers class rx.internal.util.unsafe.*ArrayQueue*Field* {
  264. long producerIndex;
  265. long consumerIndex;
  266. }
  267. -keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueProducerNodeRef {
  268. rx.internal.util.atomic.LinkedQueueNode producerNode;
  269. }
  270. -keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueConsumerNodeRef {
  271. rx.internal.util.atomic.LinkedQueueNode consumerNode;
  272. }
  273. -dontnote rx.internal.util.PlatformDependent
  274. # 保留本地native方法不被混淆
  275. -keepclasseswithmembernames class * {
  276. native <methods>;
  277. }
  278. # 保留在Activity中的方法参数是view的方法,
  279. # 这样以来我们在layout中写的onClick就不会被影响
  280. -keepclassmembers class * extends android.app.Activity{
  281. public void *(android.view.View);
  282. }
  283. # 保留我们自定义控件(继承自View)不被混淆
  284. -keep public class * extends android.view.View{
  285. *** get*();
  286. void set*(***);
  287. public <init>(android.content.Context);
  288. public <init>(android.content.Context, android.util.AttributeSet);
  289. public <init>(android.content.Context, android.util.AttributeSet, int);
  290. }
  291. # 对于带有回调函数的onXXEvent、**On*Listener的,不能被混淆
  292. -keepclassmembers class * {
  293. void *(**On*Event);
  294. void *(**On*Listener);
  295. }
  296. # webView处理,项目中没有使用到webView忽略即可
  297. -keepclassmembers class fqcn.of.javascript.interface.for.webview {
  298. public *;
  299. }
  300. -keepclassmembers class * extends android.webkit.webViewClient {
  301. public void *(android.webkit.WebView, java.lang.String, android.graphics.Bitmap);
  302. public boolean *(android.webkit.WebView, java.lang.String);
  303. }
  304. -keepclassmembers class * extends android.webkit.webViewClient {
  305. public void *(android.webkit.webView, jav.lang.String);
  306. }
  307. #----------retrofit--------------
  308. #-keepclassmembernames,allowobfuscation interface * {
  309. # @retrofit2.http.* <methods>;
  310. #}
  311. #-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
  312. #
  313. -keep class retrofit2.** { *; }
  314. -dontwarn retrofit2.**
  315. -keepattributes Signature
  316. -keepattributes Exceptions
  317. -dontwarn okio.**
  318. -dontwarn javax.annotation.**
  319. -dontoptimize
  320. -dontpreverify
  321. -keepattributes EnclosingMethod,Signature
  322. -dontwarn cn.jpush.**
  323. -keep class cn.jpush.** { *; }
  324. -dontwarn cn.jiguang.**
  325. -keep class cn.jiguang.** { *; }
  326. -dontwarn cn.jmessage.**
  327. -keep class cn.jmessage.**{ *; }
  328. -keepclassmembers class ** {
  329. public void onEvent*(**);
  330. }
  331. #========================gson================================
  332. -dontwarn com.google.**
  333. -keep class com.google.gson.** {*;}
  334. #========================protobuf================================
  335. -keep class com.google.protobuf.** {*;}
  336. #========================声望================================
  337. -keep class io.agora.**{*;}
  338. -keep public class com.xuantongyun.storagecloud.**{*;}
  339. #叭叭云
  340. -keep class com.qiniu.**{*;}
  341. -keep class com.qiniu.**{public <init>();}
  342. #叭叭美颜2
  343. -keep class com.faceunity.wrapper.faceunity {*;}
  344. #移动安全联盟
  345. -keep class com.bun.miitmdid.core.** {*;}
  346. -keep class XI.CA.XI.**{*;}
  347. -keep class XI.K0.XI.**{*;}
  348. -keep class XI.XI.K0.**{*;}
  349. -keep class XI.xo.XI.XI.**{*;}
  350. -keep class com.asus.msa.SupplementaryDID.**{*;}
  351. -keep class com.asus.msa.sdid.**{*;}
  352. -keep class com.bun.lib.**{*;}
  353. -keep class com.bun.miitmdid.**{*;}
  354. -keep class com.huawei.hms.ads.identifier.**{*;}
  355. -keep class com.samsung.android.deviceidservice.**{*;}
  356. -keep class com.zui.opendeviceidlibrary.**{*;}
  357. -keep class org.json.**{*;}
  358. -keep public class com.netease.nis.sdkwrapper.Utils {public <methods>;}
  359. #腾讯IM
  360. -keep class com.tencent.imsdk.** { *; }
  361. -keep class com.kalacheng.tim.event.*{*;}
  362. -keep class com.kalacheng.tim.bean.*{*;}
  363. #阿里云存储
  364. -keep class com.alibaba.sdk.android.oss.** { *; }
  365. -dontwarn okio.**
  366. -dontwarn org.apache.commons.codec.binary.**
  367. ######################短视频混淆配置#########################
  368. -keep class com.aliyun.**{*;}
  369. -keep class com.duanqu.**{*;}
  370. -keep class com.qu.**{*;}
  371. -keep class com.alibaba.**{*;}
  372. -keep class component.alivc.**{*;}
  373. -keep class com.alivc.**{*;}
  374. -keep class org.webrtc.**{*;}
  375. -keep class org.ugsv.**{*;}