proguard-rules.pro 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  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.framework.util.JsonUtil{*;}
  81. -keep class **.*$JavaScriptInterface{*;}
  82. # ------ 保护第三方jar包,不做混淆处理----------
  83. -keep class android.support.**{*;}
  84. -dontwarn android.support.**
  85. -keep class com.jg.**{*;}
  86. -dontwarn com.jg.**
  87. # Gson
  88. -keep class com.google.gson.**{*;}
  89. -dontwarn com.google.gson.**
  90. # 友盟
  91. -keep class com.alimama.mobile.**{*;}
  92. -dontwarn com.alimama.mobile.**
  93. -keep class com.umeng.**{*;}
  94. -dontwarn com.umeng.**
  95. -keep class u.**{*;}
  96. -dontwarn u.**
  97. # 分享
  98. -keep class cn.sharesdk.**{*;}
  99. -dontwarn cn.sharesdk.**
  100. -keep class com.mob.**{*;}
  101. -dontwarn com.mob.**
  102. # 腾讯相关
  103. -keep class com.tencent.**{*;}
  104. -dontwarn com.tencent.**
  105. -keep class com.qq.**{*;}
  106. -dontwarn com.qq.**
  107. -keep class src.com.qq.**{*;}
  108. -dontwarn src.com.qq.**
  109. # 新浪相关
  110. -keep class com.sina.**{*;}
  111. -dontwarn com.sina.**
  112. # 支付宝
  113. -keep class com.alipay.**{*;}
  114. -dontwarn com.alipay.**
  115. -keep class com.ta.utdid2.**{*;}
  116. -dontwarn com.ta.utdid2.**
  117. -keep class com.ut.device.**{*;}
  118. -dontwarn com.ut.device.**
  119. # 百度地图
  120. -keep class com.baidu.**{*;}
  121. -dontwarn com.baidu.**
  122. # 图片加载库
  123. -keep class com.bumptech.glide.Glide { *; }
  124. -keep class com.bumptech.glide.request.RequestOptions {*;}
  125. -keep public class * implements com.bumptech.glide.module.GlideModule
  126. -keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
  127. **[] $VALUES;
  128. public *;
  129. }
  130. -dontwarn com.bumptech.glide.**
  131. #智齿客服
  132. -keep class com.sobot.** {*;}
  133. -keep class com.yunva.** { *; }
  134. -keep class com.blm.** { *; }
  135. -keep class com.pg.** { *; }
  136. -dontwarn com.yunva.im.sdk.lib.**
  137. #okhttp
  138. -dontwarn okhttp3.**
  139. -dontwarn okio.**
  140. -dontwarn javax.annotation.**
  141. -keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase