proguard-rules.pro 3.4 KB

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