proguard-rules.pro 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. -dontobfuscate
  2. # Keep extension's common dependencies
  3. -keep,allowoptimization class eu.kanade.tachiyomi.** { public protected *; }
  4. -keep,allowoptimization class androidx.preference.** { *; }
  5. -keep,allowoptimization class kotlin.** { public protected *; }
  6. -keep,allowoptimization class okhttp3.** { public protected *; }
  7. -keep,allowoptimization class okio.** { public protected *; }
  8. -keep,allowoptimization class rx.** { public protected *; }
  9. -keep,allowoptimization class org.jsoup.** { public protected *; }
  10. -keep,allowoptimization class com.google.gson.** { public protected *; }
  11. -keep,allowoptimization class com.github.salomonbrys.kotson.** { public protected *; }
  12. -keep,allowoptimization class com.squareup.duktape.** { public protected *; }
  13. -keep,allowoptimization class uy.kohesive.injekt.** { public protected *; }
  14. ##---------------Begin: proguard configuration for RxJava 1.x ----------
  15. -dontwarn sun.misc.**
  16. -keepclassmembers class rx.internal.util.unsafe.*ArrayQueue*Field* {
  17. long producerIndex;
  18. long consumerIndex;
  19. }
  20. -keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueProducerNodeRef {
  21. rx.internal.util.atomic.LinkedQueueNode producerNode;
  22. }
  23. -keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueConsumerNodeRef {
  24. rx.internal.util.atomic.LinkedQueueNode consumerNode;
  25. }
  26. -dontnote rx.internal.util.PlatformDependent
  27. ##---------------End: proguard configuration for RxJava 1.x ----------
  28. ##---------------Begin: proguard configuration for Gson ----------
  29. # Gson uses generic type information stored in a class file when working with fields. Proguard
  30. # removes such information by default, so configure it to keep all of it.
  31. -keepattributes Signature
  32. # For using GSON @Expose annotation
  33. -keepattributes *Annotation*
  34. # Gson specific classes
  35. -dontwarn sun.misc.**
  36. # Prevent proguard from stripping interface information from TypeAdapter, TypeAdapterFactory,
  37. # JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)
  38. -keep class * extends com.google.gson.TypeAdapter
  39. -keep class * implements com.google.gson.TypeAdapterFactory
  40. -keep class * implements com.google.gson.JsonSerializer
  41. -keep class * implements com.google.gson.JsonDeserializer
  42. # Prevent R8 from leaving Data object members always null
  43. -keepclassmembers,allowobfuscation class * {
  44. @com.google.gson.annotations.SerializedName <fields>;
  45. }
  46. ##---------------End: proguard configuration for Gson ----------
  47. ##---------------Begin: proguard configuration for kotlinx.serialization ----------
  48. -keepattributes *Annotation*, InnerClasses
  49. -dontnote kotlinx.serialization.AnnotationsKt # core serialization annotations
  50. # kotlinx-serialization-json specific. Add this if you have java.lang.NoClassDefFoundError kotlinx.serialization.json.JsonObjectSerializer
  51. -keepclassmembers class kotlinx.serialization.json.** {
  52. *** Companion;
  53. }
  54. -keepclasseswithmembers class kotlinx.serialization.json.** {
  55. kotlinx.serialization.KSerializer serializer(...);
  56. }
  57. -keep,includedescriptorclasses class eu.kanade.tachiyomi.**$$serializer { *; }
  58. -keepclassmembers class eu.kanade.tachiyomi.** {
  59. *** Companion;
  60. }
  61. -keepclasseswithmembers class eu.kanade.tachiyomi.** {
  62. kotlinx.serialization.KSerializer serializer(...);
  63. }
  64. -keep class kotlinx.serialization.**
  65. -keepclassmembers class kotlinx.serialization.** {
  66. <methods>;
  67. }
  68. ##---------------End: proguard configuration for kotlinx.serialization ----------