proguard-rules.pro 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. # Add project specific ProGuard rules here.
  2. # You can control the set of applied configuration files using the
  3. # proguardFiles setting in build.gradle.
  4. #
  5. # For more details, see
  6. # http://developer.android.com/guide/developing/tools/proguard.html
  7. # If your project uses WebView with JS, uncomment the following
  8. # and specify the fully qualified class name to the JavaScript interface
  9. # class:
  10. #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
  11. # public *;
  12. #}
  13. # Uncomment this to preserve the line number information for
  14. # debugging stack traces.
  15. #-keepattributes SourceFile,LineNumberTable
  16. # If you keep the line number information, uncomment this to
  17. # hide the original source file name.
  18. #-renamesourcefileattribute SourceFile
  19. -keep class com.alibaba.fastjson.** { *; }
  20. -keep class fvv.** { *; }
  21. -keepclassmembers class ** {
  22. @com.squareup.otto.Subscribe public *;
  23. @com.squareup.otto.Produce public *;
  24. }
  25. -keep class com.alipay.mobile.android.verify.** { *; }
  26. #混淆报错 需要添加
  27. -dontwarn org.xmlpull.v1.XmlPullParser
  28. -dontwarn org.xmlpull.v1.XmlSerializer
  29. -keep class org.xmlpull.v1.* {*;}
  30. #混淆报错 需要添加
  31. -dontwarn org.xmlpull.v1.XmlPullParser
  32. -dontwarn org.xmlpull.v1.XmlSerializer
  33. -keep class org.xmlpull.v1.* {*;}
  34. -keep public class * implements com.bumptech.glide.module.GlideModule
  35. ##Glide
  36. -dontusemixedcaseclassnames
  37. -dontwarn com.bumptech.glide.**
  38. -keep class com.bumptech.glide.**{*;}
  39. -keep public class * implements com.bumptech.glide.module.GlideModule
  40. -keep public class * extends com.bumptech.glide.AppGlideModule
  41. -keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
  42. **[] $VALUES;
  43. public *;
  44. }
  45. -keep public class * implements com.bumptech.glide.module.GlideModule
  46. -keep class * extends com.bumptech.glide.module.AppGlideModule {
  47. <init>(...);
  48. }
  49. -keep public enum com.bumptech.glide.load.ImageHeaderParser$** {
  50. **[] $VALUES;
  51. public *;
  52. }
  53. -keep class com.bumptech.glide.load.data.ParcelFileDescriptorRewinder$InternalRewinder {
  54. *** rewind();
  55. }
  56. #RX
  57. -dontwarn sun.misc.**
  58. -keepclassmembers class rx.internal.util.unsafe.*ArrayQueue*Field* {
  59. long producerIndex;
  60. long consumerIndex;
  61. }
  62. -keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueProducerNodeRef {
  63. rx.internal.util.atomic.LinkedQueueNode producerNode;
  64. }
  65. -keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueConsumerNodeRef {
  66. rx.internal.util.atomic.LinkedQueueNode consumerNode;
  67. }
  68. #eventbus
  69. -keepattributes *Annotation*
  70. -keepclassmembers class ** {
  71. @org.greenrobot.eventbus.Subscribe <methods>;
  72. }
  73. -keep enum org.greenrobot.eventbus.ThreadMode { *; }
  74. # Only required if you use AsyncExecutor
  75. -keepclassmembers class * extends org.greenrobot.eventbus.util.ThrowableFailureEvent {
  76. <init>(java.lang.Throwable);
  77. }
  78. #retrofit
  79. # Platform calls Class.forName on types which do not exist on Android to determine platform.
  80. -dontnote retrofit2.Platform
  81. # Platform used when running on RoboVM on iOS. Will not be used at runtime.
  82. -dontnote retrofit2.Platform$IOS$MainThreadExecutor
  83. # Platform used when running on Java 8 VMs. Will not be used at runtime.
  84. -dontwarn retrofit2.Platform$Java8
  85. # Retain generic type information for use by reflection by converters and adapters.
  86. -keepattributes Signature
  87. # Retain declared checked exceptions for use by a Proxy instance.
  88. -keepattributes Exceptions
  89. -keepattributes SourceFile,LineNumberTable