Android端钱多多随手记项目

proguard-rules.pro 16KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486
  1. # Add project specific ProGuard rules here.
  2. # By default, the flags in this file are appended to flags specified
  3. # in /Users/xieshengqi/Library/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. #
  24. # 对于一些基本指令的添加
  25. #
  26. #############################################
  27. -optimizationpasses 5 # 指定代码的压缩级别
  28. -dontusemixedcaseclassnames # 是否使用大小写混合
  29. -dontskipnonpubliclibraryclasses # 是否混淆第三方jar
  30. -dontpreverify # 混淆时是否做预校验
  31. -verbose # 混淆时是否记录日志
  32. -optimizations !code/simplification/arithmetic,!field/*,!class/merging/* # 混淆时所采用的算法
  33. #
  34. -keep public class * extends android.app.Activity # 保持哪些类不被混淆
  35. -keep public class * extends android.app.FragmentActivity # 保持哪些类不被混淆
  36. -keep public class * extends android.app.AppCompatActivity # 保持哪些类不被混淆
  37. -keep public class * extends android.app.Application # 保持哪些类不被混淆
  38. -keep public class * extends android.app.Service # 保持哪些类不被混淆
  39. -keep public class * extends android.content.BroadcastReceiver # 保持哪些类不被混淆
  40. -keep public class * extends android.content.ContentProvider # 保持哪些类不被混淆
  41. -keep public class * extends android.app.backup.BackupAgentHelper # 保持哪些类不被混淆
  42. -keep public class * extends android.preference.Preference # 保持哪些类不被混淆
  43. -keep public class com.android.vending.licensing.ILicensingService # 保持哪些类不被混淆
  44. #
  45. #
  46. #指定代码的压缩级别
  47. -optimizationpasses 5
  48. #包明不混合大小写
  49. -dontusemixedcaseclassnames
  50. #不去忽略非公共的库类
  51. -dontskipnonpubliclibraryclasses
  52. #优化 不优化输入的类文件
  53. -dontoptimize
  54. #预校验
  55. -dontpreverify
  56. #混淆时是否记录日志
  57. -verbose
  58. # 混淆时所采用的算法
  59. -optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
  60. #保护注解
  61. -keepattributes *Annotation*
  62. # 保持哪些类不被混淆
  63. -keep public class * extends android.app.Fragment
  64. -keep public class * extends android.app.Activity
  65. -keep public class * extends android.app.Application
  66. -keep public class * extends android.app.Service
  67. -keep public class * extends android.content.BroadcastReceiver
  68. -keep public class * extends android.content.ContentProvider
  69. -keep public class * extends android.app.backup.BackupAgentHelper
  70. -keep public class * extends android.preference.Preference
  71. -keep public class com.android.vending.licensing.ILicensingService
  72. #如果有引用v4包可以添加下面这行
  73. -keep public class * extends android.support.v4.app.Fragment
  74. #忽略警告
  75. -ignorewarning
  76. ##记录生成的日志数据,gradle build时在本项目根目录输出##
  77. #apk 包内所有 class 的内部结构
  78. -dump proguard/class_files.txt
  79. #未混淆的类和成员
  80. -printseeds proguard/seeds.txt
  81. #列出从 apk 中删除的代码
  82. -printusage proguard/unused.txt
  83. #混淆前后的映射
  84. -printmapping proguard/mapping.txt
  85. ########记录生成的日志数据,gradle build时 在本项目根目录输出-end######
  86. #如果引用了v4或者v7包
  87. -dontwarn android.support.**
  88. ####混淆保护自己项目的部分代码以及引用的第三方jar包library-end####
  89. #保持 native 方法不被混淆
  90. -keepclasseswithmembernames class * {
  91. native <methods>;
  92. }
  93. #保持自定义控件类不被混淆
  94. -keepclasseswithmembers class * {
  95. public <init>(android.content.Context, android.util.AttributeSet);
  96. }
  97. #保持自定义控件类不被混淆
  98. -keepclassmembers class * extends android.app.Activity {
  99. public void *(android.view.View);
  100. }
  101. -keep public class * extends android.view.View {
  102. public <init>(android.content.Context);
  103. public <init>(android.content.Context, android.util.AttributeSet);
  104. public <init>(android.content.Context, android.util.AttributeSet, int);
  105. public void set*(...);
  106. }
  107. #保持 Parcelable 不被混淆
  108. -keep class * implements android.os.Parcelable {
  109. public static final android.os.Parcelable$Creator *;
  110. }
  111. #保持 Serializable 不被混淆
  112. -keepnames class * implements java.io.Serializable
  113. #保持 Serializable 不被混淆并且enum 类也不被混淆
  114. -keepclassmembers class * implements java.io.Serializable {
  115. static final long serialVersionUID;
  116. private static final java.io.ObjectStreamField[] serialPersistentFields;
  117. !static !transient <fields>;
  118. !private <fields>;
  119. !private <methods>;
  120. private void writeObject(java.io.ObjectOutputStream);
  121. private void readObject(java.io.ObjectInputStream);
  122. java.lang.Object writeReplace();
  123. java.lang.Object readResolve();
  124. }
  125. #保持枚举 enum 类不被混淆
  126. -keepclassmembers enum * {
  127. public static **[] values();
  128. public static ** valueOf(java.lang.String);
  129. }
  130. -keepclassmembers class * {
  131. public void *ButtonClicked(android.view.View);
  132. }
  133. #不混淆资源类
  134. -keepclassmembers class **.R$* {
  135. public static <fields>;
  136. }
  137. #避免混淆泛型 如果混淆报错建议关掉
  138. #-keepattributes Signature
  139. -keep class com.umeng.commonsdk.** {*;}
  140. -keepclasseswithmembernames class * { # 保持 native 方法不被混淆
  141. native <methods>;
  142. }
  143. -keepclasseswithmembers class * { # 保持自定义控件类不被混淆
  144. public <init>(android.content.Context, android.util.AttributeSet);
  145. }
  146. -keepclasseswithmembers class * {
  147. public <init>(android.content.Context, android.util.AttributeSet, int); # 保持自定义控件类不被混淆
  148. }
  149. -keepclassmembers class * extends android.app.Activity { # 保持自定义控件类不被混淆
  150. public void *(android.view.View);
  151. }
  152. -keepclassmembers class * extends android.support.v4.app.FragmentActivity { # 保持自定义控件类不被混淆
  153. public void *(android.view.View);
  154. }
  155. -keepclassmembers enum * { # 保持枚举 enum 类不被混淆
  156. public static **[] values();
  157. public static ** valueOf(java.lang.String);
  158. }
  159. -keep class * implements android.os.Parcelable { # 保持 Parcelable 不被混淆
  160. public static final android.os.Parcelable$Creator *;
  161. }
  162. #-keep class com.kuxuan.moneynote.base.; # 保持自己定义的类不被混淆
  163. # okhttp
  164. -dontwarn okio.**
  165. -keep class okio.** {*;}
  166. #第三方BaseRecyclerViewAdapterHelper
  167. -keep class com.chad.library.adapter.** {
  168. *;
  169. }
  170. -keep public class * extends com.chad.library.adapter.base.BaseQuickAdapter
  171. -keep public class * extends com.chad.library.adapter.base.BaseViewHolder
  172. -keepclassmembers class ** extends com.chad.library.adapter.base.BaseViewHolder {
  173. <init>(...);
  174. }
  175. #butterknife混淆
  176. -keep class butterknife.** { *; }
  177. -dontwarn butterknife.internal.**
  178. -keep class **$$ViewBinder { *; }
  179. -keepclasseswithmembernames class * {
  180. @butterknife.* <fields>;
  181. }
  182. -keepclasseswithmembernames class * {
  183. @butterknife.* <methods>;
  184. }
  185. #eventBus混淆
  186. -keepclassmembers class ** {
  187. @org.greenrobot.eventbus.Subscribe <methods>;
  188. }
  189. -keep enum org.greenrobot.eventbus.ThreadMode { *; }
  190. # Only required if you use AsyncExecutor
  191. -keepclassmembers class * extends org.greenrobot.eventbus.util.ThrowableFailureEvent {
  192. <init>(java.lang.Throwable);
  193. }
  194. -keep public class * implements com.bumptech.glide.module.GlideModule
  195. -keep public class * extends com.bumptech.glide.module.AppGlideModule
  196. -keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
  197. **[] $VALUES;
  198. public *;
  199. }
  200. # Retrofit
  201. -dontnote retrofit2.Platform
  202. -dontnote retrofit2.Platform$IOS$MainThreadExecutor
  203. -dontwarn retrofit2.Platform$Java8
  204. -keepattributes Signature
  205. -keepattributes Exceptions
  206. -keepclassmembers enum * {
  207. public static **[] values();
  208. public static ** valueOf(java.lang.String);
  209. }
  210. #友盟统计
  211. -keepclassmembers class * {
  212. public <init> (org.json.JSONObject);
  213. }
  214. -keep public class com.kuxuan.moneynote.R$*{
  215. public static final int *;
  216. }
  217. #
  218. #第三方裁剪
  219. -dontwarn com.yalantis.ucrop**
  220. -keep class com.yalantis.ucrop** { *; }
  221. -keep interface com.yalantis.ucrop** { *; }
  222. # Gson
  223. #-keep class com.example.testing.retrofitdemo.bean.**{*;} # 自定义数据模型的bean目录
  224. #自定义类
  225. -keep class com.kuxuan.moneynote.json.** { *; }
  226. -keep class com.kuxuan.moneynote.ad.** { *; }
  227. -keep public class * extends com.kuxuan.moneynote.base.mvpbase.BaseModel
  228. -keep public class * extends com.kuxuan.moneynote.base.mvpbase.BasePresent
  229. -keep public class * extends com.kuxuan.moneynote.base.mvpbase.BaseView
  230. -keep public class * extends com.kuxuan.moneynote.base.mvpbase.MvpFragment
  231. -keep public class * extends com.kuxuan.moneynote.base.mvpbase.MvpFragmentActivity
  232. -keep public class * extends com.kuxuan.moneynote.base.BaseViewHolder
  233. -keep class com.kuxuan.moneynote.base.**{*;}
  234. -keep class com.kuxuan.moneynote.db.**{*;}
  235. -dontshrink
  236. -dontoptimize
  237. -dontwarn com.google.android.maps.**
  238. -dontwarn android.webkit.WebView
  239. -dontwarn com.umeng.**
  240. -dontwarn com.tencent.weibo.sdk.**
  241. -dontwarn com.facebook.**
  242. -keep public class javax.**
  243. -keep public class android.webkit.**
  244. -dontwarn android.support.v4.**
  245. -keep enum com.facebook.**
  246. -keepattributes Exceptions,InnerClasses,Signature
  247. -keepattributes *Annotation*
  248. -keepattributes SourceFile,LineNumberTable
  249. -keep public interface com.facebook.**
  250. -keep public interface com.tencent.**
  251. -keep public interface com.umeng.socialize.**
  252. -keep public interface com.umeng.socialize.sensor.**
  253. -keep public interface com.umeng.scrshot.**
  254. -keep public class com.umeng.socialize.* {*;}
  255. -keep class com.facebook.**
  256. -keep class com.facebook.** { *; }
  257. -keep class com.umeng.scrshot.**
  258. -keep public class com.tencent.** {*;}
  259. -keep class com.umeng.socialize.sensor.**
  260. -keep class com.umeng.socialize.handler.**
  261. -keep class com.umeng.socialize.handler.*
  262. -keep class com.umeng.weixin.handler.**
  263. -keep class com.umeng.weixin.handler.*
  264. -keep class com.umeng.qq.handler.**
  265. -keep class com.umeng.qq.handler.*
  266. -keep class UMMoreHandler{*;}
  267. -keep class com.tencent.mm.sdk.modelmsg.WXMediaMessage {*;}
  268. -keep class com.tencent.mm.sdk.modelmsg.** implements com.tencent.mm.sdk.modelmsg.WXMediaMessage$IMediaObject {*;}
  269. -keep class im.yixin.sdk.api.YXMessage {*;}
  270. -keep class im.yixin.sdk.api.** implements im.yixin.sdk.api.YXMessage$YXMessageData{*;}
  271. -keep class com.tencent.mm.sdk.** {
  272. *;
  273. }
  274. -keep class com.tencent.mm.opensdk.** {
  275. *;
  276. }
  277. -keep class com.tencent.wxop.** {
  278. *;
  279. }
  280. -keep class com.tencent.mm.sdk.** {
  281. *;
  282. }
  283. -dontwarn twitter4j.**
  284. -keep class twitter4j.** { *; }
  285. -keep class com.tencent.** {*;}
  286. -dontwarn com.tencent.**
  287. -keep class com.kakao.** {*;}
  288. -dontwarn com.kakao.**
  289. -keep public class com.umeng.com.umeng.soexample.R$*{
  290. public static final int *;
  291. }
  292. -keep public class com.linkedin.android.mobilesdk.R$*{
  293. public static final int *;
  294. }
  295. -keepclassmembers enum * {
  296. public static **[] values();
  297. public static ** valueOf(java.lang.String);
  298. }
  299. -keep class com.tencent.open.TDialog$*
  300. -keep class com.tencent.open.TDialog$* {*;}
  301. -keep class com.tencent.open.PKDialog
  302. -keep class com.tencent.open.PKDialog {*;}
  303. -keep class com.tencent.open.PKDialog$*
  304. -keep class com.tencent.open.PKDialog$* {*;}
  305. -keep class com.umeng.socialize.impl.ImageImpl {*;}
  306. -keep class com.sina.** {*;}
  307. -dontwarn com.sina.**
  308. -keep class com.alipay.share.sdk.** {
  309. *;
  310. }
  311. -keepnames class * implements android.os.Parcelable {
  312. public static final ** CREATOR;
  313. }
  314. -keep class com.linkedin.** { *; }
  315. -keep class com.xieshengqi.** { *; }
  316. -keep class com.android.dingtalk.share.ddsharemodule.** { *; }
  317. -keepattributes Signature
  318. #greendao3.2.0,此是针对3.2.0,如果是之前的,可能需要更换下包名
  319. -keep class org.greenrobot.greendao.**{*;}
  320. -keep public class * extends org.greenrobot.greendao.AbstractDao
  321. -keepclassmembers class * extends org.greenrobot.greendao.AbstractDao {
  322. public static java.lang.String TABLENAME;
  323. }
  324. -keepclassmembers class * extends org.greenrobot.greendao.AbstractDao {
  325. public static void dropTable(org.greenrobot.greendao.database.Database, boolean);
  326. public static void createTable(org.greenrobot.greendao.database.Database, boolean);
  327. }
  328. -keep class **$Properties
  329. -keepclassmembers class **$Properties {*;}
  330. #支付宝
  331. -keep class com.alipay.android.app.IAlixPay{*;}
  332. -keep class com.alipay.android.app.IAlixPay$Stub{*;}
  333. -keep class com.alipay.android.app.IRemoteServiceCallback{*;}
  334. -keep class com.alipay.android.app.IRemoteServiceCallback$Stub{*;}
  335. -keep class com.alipay.sdk.app.PayTask{ public *;}
  336. -keep class com.alipay.sdk.app.AuthTask{ public *;}
  337. -keep class com.alipay.sdk.app.H5PayCallback {
  338. <fields>;
  339. <methods>;
  340. }
  341. -keep class com.alipay.android.phone.mrpc.core.** { *; }
  342. -keep class com.alipay.apmobilesecuritysdk.** { *; }
  343. -keep class com.alipay.mobile.framework.service.annotation.** { *; }
  344. -keep class com.alipay.mobilesecuritysdk.face.** { *; }
  345. -keep class com.alipay.tscenter.biz.rpc.** { *; }
  346. -keep class org.json.alipay.** { *; }
  347. -keep class com.alipay.tscenter.** { *; }
  348. -keep class com.ta.utdid2.** { *;}
  349. -keep class com.ut.device.** { *;}
  350. #穿山甲广告相关混淆
  351. -keep class com.bytedance.sdk.openadsdk.** { *; }
  352. -keep class com.androidquery.callback.** {*;}
  353. -keep public interface com.bytedance.sdk.openadsdk.downloadnew.** {*;}
  354. -keep class com.ss.sys.ces.* {*;}
  355. #网易云盾
  356. -keepattributes *Annotation*
  357. -keep public class com.netease.nis.captcha.**{*;}
  358. -keep public class android.webkit.**
  359. -keepattributes SetJavaScriptEnabled
  360. -keepattributes JavascriptInterface
  361. -keepclassmembers class * {
  362. @android.webkit.JavascriptInterface <methods>;
  363. }
  364. #友盟
  365. -keep class com.umeng.** {*;}
  366. -keepclassmembers class * {
  367. public <init> (org.json.JSONObject);
  368. }
  369. -keepclassmembers enum * {
  370. public static **[] values();
  371. public static ** valueOf(java.lang.String);
  372. }
  373. -keep public class * extends android.app.Service
  374. #华为推送
  375. -ignorewarning
  376. -keepattributes *Annotation*
  377. -keepattributes Exceptions
  378. -keepattributes InnerClasses
  379. -keepattributes Signature
  380. -keepattributes SourceFile,LineNumberTable
  381. -keep class com.hianalytics.android.**{*;}
  382. -keep class com.huawei.updatesdk.**{*;}
  383. -keep class com.huawei.hms.**{*;}
  384. -keep class com.huawei.android.hms.agent.**{*;}
  385. #下载工具类
  386. -keepattributes Annotation
  387. -keepclassmembers class * { @org.greenrobot.eventbus.Subscribe ;}
  388. -keep enum org.greenrobot.eventbus.ThreadMode { *; }
  389. -keepclassmembers class * extends org.greenrobot.eventbus.util.ThrowableFailureEvent { (java.lang.Throwable);}
  390. -keep class com.allenliu.versionchecklib.**{*;}
  391. #vivo推送
  392. -dontwarn com.vivo.push.**
  393. -keep class com.vivo.push.**{*; }
  394. -keep class com.vivo.vms.**{*; }
  395. -keep class com.kuxuan.moneynote.receiver.PushMessageReceiverImpl{*;}