proguard-rules.pro 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. # When editing this file, update the following files as well:
  20. # - META-INF/com.android.tools/proguard/coroutines.pro
  21. # - META-INF/com.android.tools/r8/coroutines.pro
  22. # ServiceLoader support
  23. -keepnames class kotlinx.coroutines.internal.MainDispatcherFactory {}
  24. -keepnames class kotlinx.coroutines.CoroutineExceptionHandler {}
  25. # Most of volatile fields are updated with AFU and should not be mangled
  26. -keepclassmembers class kotlinx.coroutines.** {
  27. volatile <fields>;
  28. }
  29. # Same story for the standard library's SafeContinuation that also uses AtomicReferenceFieldUpdater
  30. -keepclassmembers class kotlin.coroutines.SafeContinuation {
  31. volatile <fields>;
  32. }
  33. # These classes are only required by kotlinx.coroutines.debug.AgentPremain, which is only loaded when
  34. # kotlinx-coroutines-core is used as a Java agent, so these are not needed in contexts where ProGuard is used.
  35. -dontwarn java.lang.instrument.ClassFileTransformer
  36. -dontwarn sun.misc.SignalHandler
  37. -dontwarn java.lang.instrument.Instrumentation
  38. -dontwarn sun.misc.Signal
  39. # Only used in `kotlinx.coroutines.internal.ExceptionsConstructor`.
  40. # The case when it is not available is hidden in a `try`-`catch`, as well as a check for Android.
  41. -dontwarn java.lang.ClassValue
  42. # An annotation used for build tooling, won't be directly accessed.
  43. -dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
  44. # JSR 305 annotations are for embedding nullability information.
  45. -dontwarn javax.annotation.**
  46. # A resource is loaded with a relative path so the package of this class must be preserved.
  47. -adaptresourcefilenames okhttp3/internal/publicsuffix/PublicSuffixDatabase.gz
  48. # Animal Sniffer compileOnly dependency to ensure APIs are compatible with older versions of Java.
  49. -dontwarn org.codehaus.mojo.animal_sniffer.*
  50. # OkHttp platform used only on JVM and when Conscrypt and other security providers are available.
  51. -dontwarn okhttp3.internal.platform.**
  52. -dontwarn org.conscrypt.**
  53. -dontwarn org.bouncycastle.**
  54. -dontwarn org.openjsse.**