proguard-rules.pro 3.5 KB

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