proguard-rules.pro 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  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 com.android.vending.licensing.ILicensingService
  40. -keep class com.android.vending.licensing.ILicensingService
  41. -keep public class * extends android.widget.PopupWindow
  42. -keep class * extends android.webkit.WebChromeClient {*;}
  43. -keep class * extends android.webkit.WebViewClient {*;}
  44. -dontwarn android.webkit.WebView
  45. # 忽略原生方法
  46. -keepclasseswithmembernames class * {
  47. native <methods>;
  48. }
  49. # 忽略自定义控件
  50. -keep public class * extends android.view.View {
  51. public <init>(android.content.Context);
  52. public <init>(android.content.Context, android.util.AttributeSet);
  53. public <init>(android.content.Context, android.util.AttributeSet, int);
  54. public void set*(...);
  55. }
  56. -keepclassmembers class * {
  57. public <init> (org.json.JSONObject);
  58. }
  59. # 忽略枚举
  60. -keepclassmembers enum * {
  61. public static **[] values();
  62. public static ** valueOf(java.lang.String);
  63. }
  64. # 忽略序列化实体类
  65. -keep class * implements android.os.Parcelable {
  66. public static final android.os.Parcelable$Creator *;
  67. }
  68. -keepnames class * implements java.io.Serializable
  69. # 保持R文件不被混淆
  70. -keep class **.R$* {*;}
  71. -keep class **.R{*;}
  72. -dontwarn **.R$*
  73. -keepattributes Signature
  74. -keepattributes *Annotation*
  75. # ------ 应用定制混淆方案 ------
  76. -keep public class * extends com.shanp.shebao.ui.activity.BaseActivity
  77. -keep public class * extends com.shanp.framework.widget.pop.BasePop
  78. -keep class com.shanp.shebao.model.**{*;}
  79. -keep class com.shanp.framework.model.**{*;}
  80. -keep class com.shanp.shebao.vo.**{*;}
  81. -keep class com.shanp.framework.util.JsonUtil{*;}
  82. -keep class **.*$JavaScriptInterface{*;}
  83. # ------ 保护第三方jar包,不做混淆处理----------
  84. -keep class android.support.**{*;}
  85. -dontwarn android.support.**
  86. -keep class com.jg.**{*;}
  87. -dontwarn com.jg.**
  88. # Gson
  89. -keep class com.google.gson.**{*;}
  90. -dontwarn com.google.gson.**
  91. # 友盟
  92. -keep class com.taobao.** {*;}
  93. -dontwarn com.taobao.**
  94. -keep class org.android.** {*;}
  95. -dontwarn org.android.**
  96. -keep class anet.channel.** {*;}
  97. -dontwarn anetwork.channel.**
  98. -dontwarn anet.channel.**
  99. -keep class com.umeng.** {*;}
  100. -dontwarn com.umeng.**
  101. -keep class com.xiaomi.** {*;}
  102. -dontwarn com.xiaomi.**
  103. -keep class com.huawei.** {*;}
  104. -dontwarn com.huawei.**
  105. -keep class com.meizu.** {*;}
  106. -dontwarn com.meizu.**
  107. -keep class org.apache.thrift.** {*;}
  108. -dontwarn org.apache.thrift.**
  109. -keep class com.alibaba.sdk.android.**{*;}
  110. -keep class com.ut.**{*;}
  111. -keep class com.ta.**{*;}
  112. -keep class com.alimama.mobile.**{*;}
  113. -dontwarn com.alimama.mobile.**
  114. -keep class u.**{*;}
  115. -dontwarn u.**
  116. # 分享
  117. -keep class cn.sharesdk.**{*;}
  118. -dontwarn cn.sharesdk.**
  119. -keep class com.mob.**{*;}
  120. -dontwarn com.mob.**
  121. # 腾讯相关
  122. -keep class com.tencent.**{*;}
  123. -dontwarn com.tencent.**
  124. -keep class com.qq.**{*;}
  125. -dontwarn com.qq.**
  126. -keep class src.com.qq.**{*;}
  127. -dontwarn src.com.qq.**
  128. # 新浪相关
  129. -keep class com.sina.**{*;}
  130. -dontwarn com.sina.**
  131. # 支付宝
  132. -keep class com.alipay.**{*;}
  133. -dontwarn com.alipay.**
  134. -keep class com.ta.utdid2.**{*;}
  135. -dontwarn com.ta.utdid2.**
  136. -keep class com.ut.device.**{*;}
  137. -dontwarn com.ut.device.**
  138. -keep class org.json.alipay.** { *; }
  139. # 百度地图
  140. -keep class com.baidu.**{*;}
  141. -dontwarn com.baidu.**
  142. # 图片加载库
  143. -keep class com.bumptech.glide.Glide { *; }
  144. -keep class com.bumptech.glide.request.RequestOptions {*;}
  145. -keep public class * implements com.bumptech.glide.module.GlideModule
  146. -keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
  147. **[] $VALUES;
  148. public *;
  149. }
  150. -dontwarn com.bumptech.glide.**
  151. #智齿客服
  152. -keep class com.sobot.** {*;}
  153. -keep class com.yunva.** { *; }
  154. -keep class com.blm.** { *; }
  155. -keep class com.pg.** { *; }
  156. -dontwarn com.yunva.im.sdk.lib.**
  157. #okhttp
  158. -dontwarn okhttp3.**
  159. -dontwarn okio.**
  160. -dontwarn javax.annotation.**
  161. -keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase
  162. #穿山甲
  163. -keep class com.bytedance.sdk.openadsdk.** { *; }
  164. -keep public interface com.bytedance.sdk.openadsdk.downloadnew.** {*;}
  165. -keep class com.ss.sys.ces.* {*;}