proguard-rules.pro 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  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 okhttp3.** { *; }
  9. -keep interface okhttp3.** { *; }
  10. -dontwarn okhttp3.**
  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. # http://greenrobot.org/eventbus/documentation/proguard/
  34. -keepattributes *Annotation*
  35. -keepclassmembers class ** {
  36. @org.greenrobot.eventbus.Subscribe <methods>;
  37. }
  38. -keep enum org.greenrobot.eventbus.ThreadMode { *; }
  39. # Only required if you use AsyncExecutor
  40. -keepclassmembers class * extends org.greenrobot.eventbus.util.ThrowableFailureEvent {
  41. <init>(java.lang.Throwable);
  42. }
  43. # Glide specific rules #
  44. # https://github.com/bumptech/glide
  45. -keep public class * implements com.bumptech.glide.module.GlideModule
  46. -keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
  47. **[] $VALUES;
  48. public *;
  49. }
  50. # RxJava 1.1.0
  51. -dontwarn sun.misc.**
  52. -keepclassmembers class rx.internal.util.unsafe.*ArrayQueue*Field* {
  53. long producerIndex;
  54. long consumerIndex;
  55. }
  56. -keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueProducerNodeRef {
  57. rx.internal.util.atomic.LinkedQueueNode producerNode;
  58. }
  59. -keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueConsumerNodeRef {
  60. rx.internal.util.atomic.LinkedQueueNode consumerNode;
  61. }
  62. # Retrofit 1.X
  63. -keep class com.squareup.okhttp.** { *; }
  64. -keep class retrofit.** { *; }
  65. -keep interface com.squareup.okhttp.** { *; }
  66. -dontwarn com.squareup.okhttp.**
  67. -dontwarn okio.**
  68. -dontwarn retrofit.**
  69. -dontwarn rx.**
  70. -keepclasseswithmembers class * {
  71. @retrofit.http.* <methods>;
  72. }
  73. # If in your rest service interface you use methods with Callback argument.
  74. -keepattributes Exceptions
  75. # If your rest service methods throw custom exceptions, because you've defined an ErrorHandler.
  76. -keepattributes Signature
  77. # AppCombat
  78. -keep public class android.support.v7.widget.** { *; }
  79. -keep public class android.support.v7.internal.widget.** { *; }
  80. -keep public class android.support.v7.internal.view.menu.** { *; }
  81. -keep public class * extends android.support.v4.view.ActionProvider {
  82. public <init>(android.content.Context);
  83. }
  84. # Icepick
  85. -dontwarn icepick.**
  86. -keep class **$$Icepick { *; }
  87. -keepclasseswithmembernames class * {
  88. @icepick.* <fields>;
  89. }
  90. ## GSON 2.2.4 specific rules ##
  91. # Gson uses generic type information stored in a class file when working with fields. Proguard
  92. # removes such information by default, so configure it to keep all of it.
  93. -keepattributes Signature
  94. # For using GSON @Expose annotation
  95. -keepattributes *Annotation*
  96. -keepattributes EnclosingMethod
  97. # Gson specific classes
  98. -keep class sun.misc.Unsafe { *; }
  99. -keep class com.google.gson.stream.** { *; }
  100. ## ACRA 4.5.0 specific rules ##
  101. # we need line numbers in our stack traces otherwise they are pretty useless
  102. -renamesourcefileattribute SourceFile
  103. -keepattributes SourceFile,LineNumberTable
  104. # ACRA needs "annotations" so add this...
  105. -keepattributes *Annotation*
  106. # keep this class so that logging will show 'ACRA' and not a obfuscated name like 'a'.
  107. # Note: if you are removing log messages elsewhere in this file then this isn't necessary
  108. -keep class org.acra.ACRA {
  109. *;
  110. }
  111. # keep this around for some enums that ACRA needs
  112. -keep class org.acra.ReportingInteractionMode {
  113. *;
  114. }
  115. -keepnames class org.acra.sender.HttpSender$** {
  116. *;
  117. }
  118. -keepnames class org.acra.ReportField {
  119. *;
  120. }
  121. # keep this otherwise it is removed by ProGuard
  122. -keep public class org.acra.ErrorReporter {
  123. public void addCustomData(java.lang.String,java.lang.String);
  124. public void putCustomData(java.lang.String,java.lang.String);
  125. public void removeCustomData(java.lang.String);
  126. }
  127. # keep this otherwise it is removed by ProGuard
  128. -keep public class org.acra.ErrorReporter {
  129. public void handleSilentException(java.lang.Throwable);
  130. }
  131. # Keep the support library
  132. -keep class org.acra.** { *; }
  133. -keep interface org.acra.** { *; }