proguard-rules.pro 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. -dontobfuscate
  2. -keep class eu.kanade.tachiyomi.injection.** { *; }
  3. # Retrolambda
  4. -dontwarn java.lang.invoke.*
  5. # OkHttp
  6. -keepattributes Signature
  7. -keepattributes *Annotation*
  8. -keep class com.squareup.okhttp.** { *; }
  9. -keep interface com.squareup.okhttp.** { *; }
  10. -dontwarn com.squareup.okhttp.**
  11. -dontwarn okio.**
  12. # Okio
  13. -keep class sun.misc.Unsafe { *; }
  14. -dontwarn java.nio.file.*
  15. -dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
  16. -dontwarn okio.**
  17. # ButterKnife 7
  18. -keep class butterknife.** { *; }
  19. -dontwarn butterknife.internal.**
  20. -keep class **$$ViewBinder { *; }
  21. -keepclasseswithmembernames class * {
  22. @butterknife.* <fields>;
  23. }
  24. -keepclasseswithmembernames class * {
  25. @butterknife.* <methods>;
  26. }
  27. #Easy-Adapter v1.5.0
  28. -keepattributes *Annotation*
  29. -keepclassmembers class * extends uk.co.ribot.easyadapter.ItemViewHolder {
  30. public <init>(...);
  31. }
  32. ## GreenRobot EventBus specific rules ##
  33. # https://github.com/greenrobot/EventBus/blob/master/HOWTO.md#proguard-configuration
  34. -keepclassmembers class ** {
  35. public void onEvent*(***);
  36. }
  37. # Don't warn for missing support classes
  38. -dontwarn de.greenrobot.event.util.*$Support
  39. -dontwarn de.greenrobot.event.util.*$SupportManagerFragment
  40. # Glide specific rules #
  41. # https://github.com/bumptech/glide
  42. -keep public class * implements com.bumptech.glide.module.GlideModule
  43. -keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
  44. **[] $VALUES;
  45. public *;
  46. }
  47. # RxJava 1.1.0
  48. -dontwarn sun.misc.**
  49. -keepclassmembers class rx.internal.util.unsafe.*ArrayQueue*Field* {
  50. long producerIndex;
  51. long consumerIndex;
  52. }
  53. -keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueProducerNodeRef {
  54. rx.internal.util.atomic.LinkedQueueNode producerNode;
  55. }
  56. -keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueConsumerNodeRef {
  57. rx.internal.util.atomic.LinkedQueueNode consumerNode;
  58. }
  59. # AppCombat
  60. -keep public class android.support.v7.widget.** { *; }
  61. -keep public class android.support.v7.internal.widget.** { *; }
  62. -keep public class android.support.v7.internal.view.menu.** { *; }
  63. -keep public class * extends android.support.v4.view.ActionProvider {
  64. public <init>(android.content.Context);
  65. }
  66. # Icepick
  67. -dontwarn icepick.**
  68. -keep class **$$Icepick { *; }
  69. -keepclasseswithmembernames class * {
  70. @icepick.* <fields>;
  71. }
  72. ## GSON 2.2.4 specific rules ##
  73. # Gson uses generic type information stored in a class file when working with fields. Proguard
  74. # removes such information by default, so configure it to keep all of it.
  75. -keepattributes Signature
  76. # For using GSON @Expose annotation
  77. -keepattributes *Annotation*
  78. -keepattributes EnclosingMethod
  79. # Gson specific classes
  80. -keep class sun.misc.Unsafe { *; }
  81. -keep class com.google.gson.stream.** { *; }
  82. ## ACRA 4.5.0 specific rules ##
  83. # we need line numbers in our stack traces otherwise they are pretty useless
  84. -renamesourcefileattribute SourceFile
  85. -keepattributes SourceFile,LineNumberTable
  86. # ACRA needs "annotations" so add this...
  87. -keepattributes *Annotation*
  88. # keep this class so that logging will show 'ACRA' and not a obfuscated name like 'a'.
  89. # Note: if you are removing log messages elsewhere in this file then this isn't necessary
  90. -keep class org.acra.ACRA {
  91. *;
  92. }
  93. # keep this around for some enums that ACRA needs
  94. -keep class org.acra.ReportingInteractionMode {
  95. *;
  96. }
  97. -keepnames class org.acra.sender.HttpSender$** {
  98. *;
  99. }
  100. -keepnames class org.acra.ReportField {
  101. *;
  102. }
  103. # keep this otherwise it is removed by ProGuard
  104. -keep public class org.acra.ErrorReporter {
  105. public void addCustomData(java.lang.String,java.lang.String);
  106. public void putCustomData(java.lang.String,java.lang.String);
  107. public void removeCustomData(java.lang.String);
  108. }
  109. # keep this otherwise it is removed by ProGuard
  110. -keep public class org.acra.ErrorReporter {
  111. public void handleSilentException(java.lang.Throwable);
  112. }
  113. # Keep the support library
  114. -keep class org.acra.** { *; }
  115. -keep interface org.acra.** { *; }