Skip to content

Commit

Permalink
Add a keep rule for AndroidDispatcherFactory for R8 version > 1.6.0 (K…
Browse files Browse the repository at this point in the history
…otlin#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.
  • Loading branch information
OscarSpruit committed Jul 21, 2020
1 parent 716d21c commit 3cc9b94
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
boolean ANDROID_DETECTED return true;
}

-keep class kotlinx.coroutines.android.AndroidDispatcherFactory {*;}

# Disable support for "Missing Main Dispatcher", since we always have Android main dispatcher
-assumenosideeffects class kotlinx.coroutines.internal.MainDispatchersKt {
boolean SUPPORT_MISSING return false;
Expand Down

0 comments on commit 3cc9b94

Please sign in to comment.