1# When editing this file, update the following files as well:
2# - META-INF/proguard/coroutines.pro
3# - META-INF/com.android.tools/r8/coroutines.pro
4
5# ServiceLoader support
6-keepnames class kotlinx.coroutines.internal.MainDispatcherFactory {}
7-keepnames class kotlinx.coroutines.CoroutineExceptionHandler {}
8
9# Most of volatile fields are updated with AFU and should not be mangled
10-keepclassmembers class kotlinx.coroutines.** {
11    volatile <fields>;
12}
13
14# Same story for the standard library's SafeContinuation that also uses AtomicReferenceFieldUpdater
15-keepclassmembers class kotlin.coroutines.SafeContinuation {
16    volatile <fields>;
17}
18
19# These classes are only required by kotlinx.coroutines.debug.AgentPremain, which is only loaded when
20# kotlinx-coroutines-core is used as a Java agent, so these are not needed in contexts where ProGuard is used.
21-dontwarn java.lang.instrument.ClassFileTransformer
22-dontwarn sun.misc.SignalHandler
23-dontwarn java.lang.instrument.Instrumentation
24-dontwarn sun.misc.Signal
25
26# Only used in `kotlinx.coroutines.internal.ExceptionsConstructor`.
27# The case when it is not available is hidden in a `try`-`catch`, as well as a check for Android.
28-dontwarn java.lang.ClassValue
29
30# An annotation used for build tooling, won't be directly accessed.
31-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
32