proguard-rules.pro 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  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. -dontwarn cn.sharesdk.**
  135. -keep class com.mob.**{*;}
  136. -dontwarn com.mob.**
  137. # 腾讯相关
  138. -keep class com.tencent.**{*;}
  139. -dontwarn com.tencent.**
  140. -keep class com.qq.**{*;}
  141. -dontwarn com.qq.**
  142. -keep class src.com.qq.**{*;}
  143. -dontwarn src.com.qq.**
  144. # 新浪相关
  145. -keep class com.sina.**{*;}
  146. -dontwarn com.sina.**
  147. # 支付宝
  148. -keep class com.alipay.**{*;}
  149. -dontwarn com.alipay.**
  150. -keep class com.ta.utdid2.**{*;}
  151. -dontwarn com.ta.utdid2.**
  152. -keep class com.ut.device.**{*;}
  153. -dontwarn com.ut.device.**
  154. -keep class org.json.alipay.** { *; }
  155. # 百度地图
  156. -keep class com.baidu.location.** {*;}
  157. -keep class com.baidu.**{*;}
  158. -dontwarn com.baidu.**
  159. # 图片加载库
  160. -keep class com.bumptech.glide.Glide { *; }
  161. -keep class com.bumptech.glide.request.RequestOptions {*;}
  162. -keep public class * implements com.bumptech.glide.module.GlideModule
  163. -keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
  164. **[] $VALUES;
  165. public *;
  166. }
  167. -dontwarn com.bumptech.glide.**
  168. #智齿客服
  169. -keep class com.sobot.** {*;}
  170. -keep class com.yunva.** { *; }
  171. -dontwarn com.yunva.im.sdk.lib.**
  172. -keep class com.blm.** { *; }
  173. -keep class com.pg.** { *; }
  174. -keep class com.nostra13.universalimageloader.** { *; }
  175. -keepclassmembers class com.nostra13.universalimageloader.** {*;}
  176. -dontwarn com.nostra13.universalimageloader.**
  177. #okhttp
  178. -dontwarn okhttp3.**
  179. -dontwarn okio.**
  180. -dontwarn javax.annotation.**
  181. -keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase
  182. #穿山甲
  183. -keep class com.bytedance.sdk.openadsdk.** { *; }
  184. -keep class com.bytedance.frameworks.** { *; }
  185. -keep class ms.bd.c.Pgl.**{*;}
  186. -keep class com.bytedance.mobsec.metasec.ml.**{*;}
  187. -keep class com.ss.android.**{*;}
  188. -keep class com.bytedance.embedapplog.** {*;}
  189. -keep class com.bytedance.embed_dr.** {*;}
  190. -keep class com.bykv.vk.** {*;}
  191. #一键登录
  192. -dontwarn com.cmic.gen.sdk.**
  193. -keep class com.cmic.gen.sdk.**{*;}
  194. -dontwarn com.sdk.**
  195. -keep class com.sdk.** { *;}
  196. -dontwarn com.unikuwei.mianmi.account.shield.**
  197. -keep class com.unikuwei.mianmi.account.shield.** {*;}
  198. -keep class cn.com.chinatelecom.account.api.**{*;}