proguard-rules.pro 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # Add project specific ProGuard rules here.
  2. # You can control the set of applied configuration files using the
  3. # proguardFiles setting in build.gradle.
  4. #
  5. # For more details, see
  6. # http://developer.android.com/guide/developing/tools/proguard.html
  7. # If your project uses WebView with JS, uncomment the following
  8. # and specify the fully qualified class name to the JavaScript interface
  9. # class:
  10. #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
  11. # public *;
  12. #}
  13. # Uncomment this to preserve the line number information for
  14. # debugging stack traces.
  15. #-keepattributes SourceFile,LineNumberTable
  16. # If you keep the line number information, uncomment this to
  17. # hide the original source file name.
  18. #-renamesourcefileattribute SourceFile
  19. # Keep `Companion` object fields of serializable classes.
  20. # This avoids serializer lookup through `getDeclaredClasses` as done for named companion objects.
  21. -if @kotlinx.serialization.Serializable class **
  22. -keepclassmembers class <1> {
  23. static <1>$Companion Companion;
  24. }
  25. # Keep `serializer()` on companion objects (both default and named) of serializable classes.
  26. -if @kotlinx.serialization.Serializable class ** {
  27. static **$* *;
  28. }
  29. -keepclassmembers class <2>$<3> {
  30. kotlinx.serialization.KSerializer serializer(...);
  31. }
  32. # Keep `INSTANCE.serializer()` of serializable objects.
  33. -if @kotlinx.serialization.Serializable class ** {
  34. public static ** INSTANCE;
  35. }
  36. -keepclassmembers class <1> {
  37. public static <1> INSTANCE;
  38. kotlinx.serialization.KSerializer serializer(...);
  39. }
  40. # @Serializable and @Polymorphic are used at runtime for polymorphic serialization.
  41. -keepattributes RuntimeVisibleAnnotations,AnnotationDefault