1
0
Fork 0

For #4064: Update R8/ProGuard config for new Kotlin coroutines library (#7218)

master
Colin Lee 2019-12-17 10:41:54 -06:00 committed by GitHub
parent 16b4680c06
commit c0b9ad77be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 6 deletions

View File

@ -33,14 +33,17 @@
####################################################################################################
# Force removal of slow Dispatchers.Main ServiceLoader
#
# Please remove these rules when Android Gradle Plugin 3.6+ & coroutines 1.3.0+ are both in use
####################################################################################################
# Ensure the custom, fast service loader implementation is removed.
-assumevalues class kotlinx.coroutines.internal.MainDispatcherLoader {
boolean FAST_SERVICE_LOADER_ENABLED return false;
# Allow R8 to optimize away the FastServiceLoader.
# Together with ServiceLoader optimization in R8
# this results in direct instantiation when loading Dispatchers.Main
-assumenosideeffects class kotlinx.coroutines.internal.MainDispatcherLoader {
boolean FAST_SERVICE_LOADER_ENABLED return false;
}
-assumenosideeffects class kotlinx.coroutines.internal.FastServiceLoader {
boolean ANDROID_DETECTED return true;
}
-checkdiscard class kotlinx.coroutines.internal.FastServiceLoader
####################################################################################################
# Mozilla Application Services