proguard-rules.pro 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  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. # 分享
  120. -keep class cn.sharesdk.**{*;}
  121. -dontwarn cn.sharesdk.**
  122. -keep class com.mob.**{*;}
  123. -dontwarn com.mob.**
  124. # 腾讯相关
  125. -keep class com.tencent.**{*;}
  126. -dontwarn com.tencent.**
  127. -keep class com.qq.**{*;}
  128. -dontwarn com.qq.**
  129. -keep class src.com.qq.**{*;}
  130. -dontwarn src.com.qq.**
  131. # 新浪相关
  132. -keep class com.sina.**{*;}
  133. -dontwarn com.sina.**
  134. # 支付宝
  135. -keep class com.alipay.**{*;}
  136. -dontwarn com.alipay.**
  137. -keep class com.ta.utdid2.**{*;}
  138. -dontwarn com.ta.utdid2.**
  139. -keep class com.ut.device.**{*;}
  140. -dontwarn com.ut.device.**
  141. -keep class org.json.alipay.** { *; }
  142. # 百度地图
  143. -keep class com.baidu.location.** {*;}
  144. -keep class com.baidu.**{*;}
  145. -dontwarn com.baidu.**
  146. # 图片加载库
  147. -keep class com.bumptech.glide.Glide { *; }
  148. -keep class com.bumptech.glide.request.RequestOptions {*;}
  149. -keep public class * implements com.bumptech.glide.module.GlideModule
  150. -keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
  151. **[] $VALUES;
  152. public *;
  153. }
  154. -dontwarn com.bumptech.glide.**
  155. #智齿客服
  156. -keep class com.sobot.** {*;}
  157. -keep class com.yunva.** { *; }
  158. -dontwarn com.yunva.im.sdk.lib.**
  159. -keep class com.blm.** { *; }
  160. -keep class com.pg.** { *; }
  161. -keep class com.nostra13.universalimageloader.** { *; }
  162. -keepclassmembers class com.nostra13.universalimageloader.** {*;}
  163. -dontwarn com.nostra13.universalimageloader.**
  164. #okhttp
  165. -dontwarn okhttp3.**
  166. -dontwarn okio.**
  167. -dontwarn javax.annotation.**
  168. -keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase
  169. #穿山甲
  170. -keep class com.bytedance.sdk.openadsdk.** { *; }
  171. -keep public interface com.bytedance.sdk.openadsdk.downloadnew.** {*;}
  172. -keep class com.pgl.sys.ces.* {*;}
  173. -keep class com.bytedance.embed_dr.** {*;}
  174. -keep class com.bytedance.embedapplog.** {*;}
  175. #一键登录
  176. -dontwarn com.cmic.sso.sdk.**
  177. -dontwarn com.unikuwei.mianmi.account.shield.**
  178. -dontwarn com.sdk.**
  179. -keep class com.cmic.sso.sdk.**{*;}
  180. -keep class com.sdk.** { *;}
  181. -keep class com.unikuwei.mianmi.account.shield.** {*;}
  182. -keep class cn.com.chinatelecom.account.api.**{*;}