Skip to content

Commit 39c7ca5

Browse files
committed
Update ProGuard rules to keep Android-specific classes as well
Workaround for #983
1 parent 46c3563 commit 39c7ca5

File tree

4 files changed

+10
-0
lines changed

4 files changed

+10
-0
lines changed

core/kotlinx-coroutines-core/resources/META-INF/proguard/coroutines.pro

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# ServiceLoader support
22
-keepnames class kotlinx.coroutines.internal.MainDispatcherFactory {}
33
-keepnames class kotlinx.coroutines.CoroutineExceptionHandler {}
4+
-keepnames class kotlinx.coroutines.android.AndroidExceptionPreHandler {}
5+
-keepnames class kotlinx.coroutines.android.AndroidDispatcherFactory {}
46

57
# Most of volatile fields are updated with AFU and should not be mangled
68
-keepclassmembernames class kotlinx.** {

core/kotlinx-coroutines-test/resources/META-INF/proguard/coroutines.pro

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# ServiceLoader support
22
-keepnames class kotlinx.coroutines.test.internal.TestMainDispatcherFactory {}
3+
-keepnames class kotlinx.coroutines.android.AndroidExceptionPreHandler {}
4+
-keepnames class kotlinx.coroutines.android.AndroidDispatcherFactory {}
35

46
# Most of volatile fields are updated with AFU and should not be mangled
57
-keepclassmembernames class kotlinx.** {
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
-keepnames class kotlinx.coroutines.internal.MainDispatcherFactory {}
22
-keepnames class kotlinx.coroutines.CoroutineExceptionHandler {}
3+
-keepnames class kotlinx.coroutines.android.AndroidExceptionPreHandler {}
4+
-keepnames class kotlinx.coroutines.android.AndroidDispatcherFactory {}
5+
36
-keepclassmembernames class kotlinx.** {
47
volatile <fields>;
58
}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
-keepnames class kotlinx.coroutines.internal.MainDispatcherFactory {}
22
-keepnames class kotlinx.coroutines.CoroutineExceptionHandler {}
3+
-keepnames class kotlinx.coroutines.android.AndroidExceptionPreHandler {}
4+
-keepnames class kotlinx.coroutines.android.AndroidDispatcherFactory {}
5+
36
-keepclassmembernames class kotlinx.** {
47
volatile <fields>;
58
}

0 commit comments

Comments
 (0)