proguard-rules.pro 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. # Add project specific ProGuard rules here.
  2. # By default, the flags in this file are appended to flags specified
  3. # in /Users/hitherejoe/Android Studio.app/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. # Retrolambda
  17. -dontwarn java.lang.invoke.*
  18. # OkHttp
  19. -keepattributes Signature
  20. -keepattributes *Annotation*
  21. -keep class com.squareup.okhttp.** { *; }
  22. -keep interface com.squareup.okhttp.** { *; }
  23. -dontwarn com.squareup.okhttp.**
  24. -dontwarn okio.**
  25. # Butterknife
  26. -keep class butterknife.** { *; }
  27. -dontwarn butterknife.internal.**
  28. -keep class **$$ViewBinder { *; }
  29. -keepclasseswithmembernames class * {
  30. @butterknife.* <fields>;
  31. }
  32. -keepclasseswithmembernames class * {
  33. @butterknife.* <methods>;
  34. }
  35. #Easy-Adapter v1.5.0
  36. -keepattributes *Annotation*
  37. -keepclassmembers class * extends uk.co.ribot.easyadapter.ItemViewHolder {
  38. public <init>(...);
  39. }
  40. ## GreenRobot EventBus specific rules ##
  41. # https://github.com/greenrobot/EventBus/blob/master/HOWTO.md#proguard-configuration
  42. -keepclassmembers class ** {
  43. public void onEvent*(***);
  44. }
  45. # Only required if you use AsyncExecutor
  46. -keepclassmembers class * extends de.greenrobot.event.util.ThrowableFailureEvent {
  47. public <init>(java.lang.Throwable);
  48. }
  49. # Don't warn for missing support classes
  50. -dontwarn de.greenrobot.event.util.*$Support
  51. -dontwarn de.greenrobot.event.util.*$SupportManagerFragment
  52. # Glide specific rules #
  53. # https://github.com/bumptech/glide
  54. -keep public class * implements com.bumptech.glide.module.GlideModule
  55. -keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
  56. **[] $VALUES;
  57. public *;
  58. }
  59. # RxJava 0.21
  60. -keep class rx.schedulers.Schedulers {
  61. public static <methods>;
  62. }
  63. -keep class rx.schedulers.ImmediateScheduler {
  64. public <methods>;
  65. }
  66. -keep class rx.schedulers.TestScheduler {
  67. public <methods>;
  68. }
  69. -keep class rx.schedulers.Schedulers {
  70. public static ** test();
  71. }
  72. -dontwarn sun.misc.Unsafe
  73. # AppCombat
  74. -keep public class android.support.v7.widget.** { *; }
  75. -keep public class android.support.v7.internal.widget.** { *; }
  76. -keep public class android.support.v7.internal.view.menu.** { *; }
  77. -keep public class * extends android.support.v4.view.ActionProvider {
  78. public <init>(android.content.Context);
  79. }
  80. # Icepick
  81. -dontwarn icepick.**
  82. -keep class **$$Icepick { *; }
  83. -keepclasseswithmembernames class * {
  84. @icepick.* <fields>;
  85. }