proguard-rules.pro 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. # Add project specific ProGuard rules here.
  2. # By default, the flags in this file are appended to flags specified
  3. # in /Users/shanpin_lxw/Desktop/Leexw/DevelopmentTool/android-sdk/tools/proguard/proguard-android.txt
  4. # You can edit the include path and order by changing the proguardFiles
  5. # directive in build.gradle.
  6. #
  7. # For more details, see
  8. # http://developer.android.com/guide/developing/tools/proguard.html
  9. # Add any project specific keep options here:
  10. # If your project uses WebView with JS, uncomment the following
  11. # and specify the fully qualified class name to the JavaScript interface
  12. # class:
  13. #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
  14. # public *;
  15. #}
  16. # Uncomment this to preserve the line number information for
  17. # debugging stack traces.
  18. #-keepattributes SourceFile,LineNumberTable
  19. # If you keep the line number information, uncomment this to
  20. # hide the original source file name.
  21. #-renamesourcefileattribute SourceFile
  22. # ------ 通用配置 ------
  23. -optimizationpasses 5
  24. -dontusemixedcaseclassnames
  25. -dontskipnonpubliclibraryclasses
  26. -dontpreverify
  27. -verbose
  28. -optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
  29. -ignorewarnings
  30. # ------ 官方模板推荐不需要混淆的组件 ------
  31. -keep public class * extends android.app.Activity
  32. -keep public class * extends android.app.Fragment
  33. -keep public class * extends android.app.Application
  34. -keep public class * extends android.app.Service
  35. -keep public class * extends android.content.BroadcastReceiver
  36. -keep public class * extends android.content.ContentProvider
  37. -keep public class * extends android.app.backup.BackupAgentHelper
  38. -keep public class * extends android.preference.Preference
  39. -keep public class * extends androidx.fragment.app.Fragment
  40. -keep public class com.android.vending.licensing.ILicensingService
  41. -keep class com.android.vending.licensing.ILicensingService
  42. -keep public class * extends android.widget.PopupWindow
  43. -keep class * extends android.webkit.WebChromeClient {*;}
  44. -keep class * extends android.webkit.WebViewClient {*;}
  45. -dontwarn android.webkit.WebView
  46. # 忽略原生方法
  47. -keepclasseswithmembernames class * {
  48. native <methods>;
  49. }
  50. # 忽略自定义控件
  51. -keep public class * extends android.view.View {
  52. public <init>(android.content.Context);
  53. public <init>(android.content.Context, android.util.AttributeSet);
  54. public <init>(android.content.Context, android.util.AttributeSet, int);
  55. public void set*(...);
  56. }
  57. -keepclassmembers class * {
  58. public <init> (org.json.JSONObject);
  59. }
  60. # 忽略枚举
  61. -keepclassmembers enum * {
  62. public static **[] values();
  63. public static ** valueOf(java.lang.String);
  64. }
  65. # 忽略序列化实体类
  66. -keep class * implements android.os.Parcelable {
  67. public static final android.os.Parcelable$Creator *;
  68. }
  69. -keepnames class * implements java.io.Serializable
  70. # 保持R文件不被混淆
  71. -keep class **.R$* {*;}
  72. -keep class **.R{*;}
  73. -dontwarn **.R$*
  74. -keepattributes Signature
  75. -keepattributes *Annotation*
  76. # ------ 应用定制混淆方案 ------
  77. -keep public class * extends com.shanp.shebao.ui.activity.BaseActivity
  78. -keep public class * extends com.shanp.framework.widget.pop.BasePop
  79. -keep class com.shanp.shebao.model.**{*;}
  80. -keep class com.shanp.framework.model.**{*;}
  81. -keep class com.shanp.shebao.vo.**{*;}
  82. -keep class com.shanp.framework.util.JsonUtil{*;}
  83. -keep class **.*$JavaScriptInterface{*;}
  84. -keep public class * extends androidx.**
  85. -dontwarn androidx.**
  86. # ------ 保护第三方jar包,不做混淆处理----------
  87. -keep class android.support.**{*;}
  88. -dontwarn android.support.**
  89. -keep class com.jg.**{*;}
  90. -dontwarn com.jg.**
  91. # Gson
  92. -keep class com.google.gson.**{*;}
  93. -dontwarn com.google.gson.**
  94. # 友盟
  95. -keep class com.taobao.** {*;}
  96. -dontwarn com.taobao.**
  97. -keep class org.android.** {*;}
  98. -dontwarn org.android.**
  99. -keep class anet.channel.** {*;}
  100. -dontwarn anetwork.channel.**
  101. -dontwarn anet.channel.**
  102. -keep class com.umeng.** {*;}
  103. -dontwarn com.umeng.**
  104. -keep class com.xiaomi.** {*;}
  105. -dontwarn com.xiaomi.**
  106. -keep class com.huawei.** {*;}
  107. -dontwarn com.huawei.**
  108. -keep class com.meizu.** {*;}
  109. -dontwarn com.meizu.**
  110. -keep class org.apache.thrift.** {*;}
  111. -dontwarn org.apache.thrift.**
  112. -keep class com.alibaba.sdk.android.**{*;}
  113. -keep class com.ut.**{*;}
  114. -keep class com.ta.**{*;}
  115. -keep class com.alimama.mobile.**{*;}
  116. -dontwarn com.alimama.mobile.**
  117. -keep class u.**{*;}
  118. -dontwarn u.**
  119. -keep class org.android.agoo.xiaomi.MiPushBroadcastReceiver {*;}
  120. -ignorewarnings
  121. -keepattributes *Annotation*, Exceptions, InnerClasses, Signature, SourceFile, LineNumberTable
  122. -keep class com.hianalytics.android.** {*;}
  123. -keep class com.huawei.updatesdk.** {*;}
  124. -keep class com.huawei.hms.** {*;}
  125. -keep public class * extends android.app.Service
  126. -dontwarn com.vivo.push.**
  127. -keep class com.vivo.push.** {*;}
  128. -keep class com.vivo.vms.** {*;}
  129. -keep class com.hihonor.android.push.** {*;}
  130. -keep class com.hihonor.push.** {*;}
  131. -keep class org.android.agoo.honor.* {*;}
  132. # 分享
  133. -keep class cn.sharesdk.**{*;}
  134. -keep class com.sina.**{*;}
  135. -keep class com.mob.**{*;}
  136. -keep class com.bytedance.**{*;}
  137. -dontwarn cn.sharesdk.**
  138. -dontwarn com.sina.**
  139. -dontwarn com.mob.**
  140. # 腾讯相关
  141. -keep class com.tencent.**{*;}
  142. -dontwarn com.tencent.**
  143. -keep class com.qq.**{*;}
  144. -dontwarn com.qq.**
  145. -keep class src.com.qq.**{*;}
  146. -dontwarn src.com.qq.**
  147. # 新浪相关
  148. -keep class com.sina.**{*;}
  149. -dontwarn com.sina.**
  150. # 支付宝
  151. -keep class com.alipay.**{*;}
  152. -dontwarn com.alipay.**
  153. -keep class com.ta.utdid2.**{*;}
  154. -dontwarn com.ta.utdid2.**
  155. -keep class com.ut.device.**{*;}
  156. -dontwarn com.ut.device.**
  157. -keep class org.json.alipay.** { *; }
  158. # 百度地图
  159. -keep class com.baidu.location.** {*;}
  160. -keep class com.baidu.**{*;}
  161. -dontwarn com.baidu.**
  162. # 图片加载库
  163. -keep class com.bumptech.glide.Glide { *; }
  164. -keep class com.bumptech.glide.request.RequestOptions {*;}
  165. -keep public class * implements com.bumptech.glide.module.GlideModule
  166. -keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
  167. **[] $VALUES;
  168. public *;
  169. }
  170. -dontwarn com.bumptech.glide.**
  171. #智齿客服
  172. -keep class com.sobot.** {*;}
  173. -keep class com.yunva.** { *; }
  174. -dontwarn com.yunva.im.sdk.lib.**
  175. -keep class com.blm.** { *; }
  176. -keep class com.pg.** { *; }
  177. -keep class com.nostra13.universalimageloader.** { *; }
  178. -keepclassmembers class com.nostra13.universalimageloader.** {*;}
  179. -dontwarn com.nostra13.universalimageloader.**
  180. #okhttp
  181. -dontwarn okhttp3.**
  182. -dontwarn okio.**
  183. -dontwarn javax.annotation.**
  184. -keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase
  185. #穿山甲
  186. -keep class com.bytedance.sdk.openadsdk.** { *; }
  187. -keep class com.bytedance.frameworks.** { *; }
  188. -keep class ms.bd.c.Pgl.**{*;}
  189. -keep class com.bytedance.mobsec.metasec.ml.**{*;}
  190. -keep class com.ss.android.**{*;}
  191. -keep class com.bytedance.embedapplog.** {*;}
  192. -keep class com.bytedance.embed_dr.** {*;}
  193. -keep class com.bykv.vk.** {*;}
  194. #一键登录
  195. -dontwarn com.cmic.gen.sdk.**
  196. -keep class com.cmic.gen.sdk.**{*;}
  197. -dontwarn com.sdk.**
  198. -keep class com.sdk.** { *;}
  199. -dontwarn com.unikuwei.mianmi.account.shield.**
  200. -keep class com.unikuwei.mianmi.account.shield.** {*;}
  201. -keep class cn.com.chinatelecom.account.api.**{*;}