Android端钱多多随手记项目

proguard-rules.pro 5.4KB

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