proguard-rules.pro 4.1 KB

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