Skip to content

Commit 3cc9b94

Browse files
authored
Add a keep rule for AndroidDispatcherFactory for R8 version > 1.6.0 (#2154)
In commit #3a8a0ea this keep rule was removed from kotlinx-coroutines-core (which is good), but this caused AndroidDispatcherFactory to be minimized in newer R8 versions. Adding a rule explicitly fixes the problem.
1 parent 716d21c commit 3cc9b94

File tree

1 file changed

+2
-0
lines changed
  • ui/kotlinx-coroutines-android/resources/META-INF/com.android.tools/r8-from-1.6.0

1 file changed

+2
-0
lines changed

ui/kotlinx-coroutines-android/resources/META-INF/com.android.tools/r8-from-1.6.0/coroutines.pro

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
boolean ANDROID_DETECTED return true;
1010
}
1111

12+
-keep class kotlinx.coroutines.android.AndroidDispatcherFactory {*;}
13+
1214
# Disable support for "Missing Main Dispatcher", since we always have Android main dispatcher
1315
-assumenosideeffects class kotlinx.coroutines.internal.MainDispatchersKt {
1416
boolean SUPPORT_MISSING return false;

0 commit comments

Comments
 (0)