Android端钱多多随手记项目

proguard-rules.pro 6.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  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. -keep public class * extends android.app.Activity # 保持哪些类不被混淆
  34. -keep public class * extends android.app.FragmentActivity # 保持哪些类不被混淆
  35. -keep public class * extends android.app.AppCompatActivity # 保持哪些类不被混淆
  36. -keep public class * extends android.app.Application # 保持哪些类不被混淆
  37. -keep public class * extends android.app.Service # 保持哪些类不被混淆
  38. -keep public class * extends android.content.BroadcastReceiver # 保持哪些类不被混淆
  39. -keep public class * extends android.content.ContentProvider # 保持哪些类不被混淆
  40. -keep public class * extends android.app.backup.BackupAgentHelper # 保持哪些类不被混淆
  41. -keep public class * extends android.preference.Preference # 保持哪些类不被混淆
  42. -keep public class com.android.vending.licensing.ILicensingService # 保持哪些类不被混淆
  43. -keep class com.kuxuan.moneynote.json.** { *; }
  44. -keep public class * extends com.kuxuan.moneynote.base.mvpbase.BaseModel
  45. -keep public class * extends com.kuxuan.moneynote.base.mvpbase.BasePresent
  46. -keep public class * extends com.kuxuan.moneynote.base.mvpbase.BaseView
  47. -keep public class * extends com.kuxuan.moneynote.base.mvpbase.MvpFragment
  48. -keep public class * extends com.kuxuan.moneynote.base.mvpbase.MvpFragmentActivity
  49. -keepclasseswithmembernames class * { # 保持 native 方法不被混淆
  50. native <methods>;
  51. }
  52. -keepclasseswithmembers class * { # 保持自定义控件类不被混淆
  53. public <init>(android.content.Context, android.util.AttributeSet);
  54. }
  55. -keepclasseswithmembers class * {
  56. public <init>(android.content.Context, android.util.AttributeSet, int); # 保持自定义控件类不被混淆
  57. }
  58. -keepclassmembers class * extends android.app.Activity { # 保持自定义控件类不被混淆
  59. public void *(android.view.View);
  60. }
  61. -keepclassmembers class * extends android.support.v4.app.FragmentActivity { # 保持自定义控件类不被混淆
  62. public void *(android.view.View);
  63. }
  64. -keepclassmembers enum * { # 保持枚举 enum 类不被混淆
  65. public static **[] values();
  66. public static ** valueOf(java.lang.String);
  67. }
  68. -keep class * implements android.os.Parcelable { # 保持 Parcelable 不被混淆
  69. public static final android.os.Parcelable$Creator *;
  70. }
  71. #-keep class com.kuxuan.moneynote.base.; # 保持自己定义的类不被混淆
  72. # okhttp
  73. -dontwarn okio.**
  74. -keep class okio.** {*;}
  75. -keep class com.chad.library.adapter.** {
  76. *;
  77. }
  78. -keep public class * extends com.chad.library.adapter.base.BaseQuickAdapter
  79. -keep public class * extends com.chad.library.adapter.base.BaseViewHolder
  80. -keepclassmembers class **$** extends com.chad.library.adapter.base.BaseViewHolder {
  81. <init>(...);
  82. }
  83. -keep class butterknife.** { *; }
  84. -dontwarn butterknife.internal.**
  85. -keep class **$$ViewBinder { *; }
  86. -keepclasseswithmembernames class * {
  87. @butterknife.* <fields>;
  88. }
  89. -keepclasseswithmembernames class * {
  90. @butterknife.* <methods>;
  91. }
  92. -keepclassmembers class ** {
  93. @org.greenrobot.eventbus.Subscribe <methods>;
  94. }
  95. -keep enum org.greenrobot.eventbus.ThreadMode { *; }
  96. # Only required if you use AsyncExecutor
  97. -keepclassmembers class * extends org.greenrobot.eventbus.util.ThrowableFailureEvent {
  98. <init>(java.lang.Throwable);
  99. }
  100. -keep public class * implements com.bumptech.glide.module.GlideModule
  101. -keep public class * extends com.bumptech.glide.module.AppGlideModule
  102. -keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
  103. **[] $VALUES;
  104. public *;
  105. }
  106. # Retrofit
  107. -dontnote retrofit2.Platform
  108. -dontnote retrofit2.Platform$IOS$MainThreadExecutor
  109. -dontwarn retrofit2.Platform$Java8
  110. -keepattributes Signature
  111. -keepattributes Exceptions
  112. #
  113. #第三方裁剪
  114. -dontwarn com.yalantis.ucrop**
  115. -keep class com.yalantis.ucrop** { *; }
  116. -keep interface com.yalantis.ucrop** { *; }
  117. # Gson
  118. #-keep class com.example.testing.retrofitdemo.bean.**{*;} # 自定义数据模型的bean目录