Wojtek KaliciĆski | d6b0b0f | 2019-06-28 11:41:29 +0200 | [diff] [blame] | 1 | # Allow R8 to optimize away the FastServiceLoader. |
| 2 | # Together with ServiceLoader optimization in R8 |
| 3 | # this results in direct instantiation when loading Dispatchers.Main |
| 4 | -assumenosideeffects class kotlinx.coroutines.internal.MainDispatcherLoader { |
| 5 | boolean FAST_SERVICE_LOADER_ENABLED return false; |
Vsevolod Tolstopyatov | e60ec8e | 2019-12-12 12:10:21 +0300 | [diff] [blame] | 6 | } |
| 7 | |
Roman Elizarov | bf9509d | 2020-02-14 15:52:10 +0300 | [diff] [blame] | 8 | -assumenosideeffects class kotlinx.coroutines.internal.FastServiceLoaderKt { |
Vsevolod Tolstopyatov | e60ec8e | 2019-12-12 12:10:21 +0300 | [diff] [blame] | 9 | boolean ANDROID_DETECTED return true; |
Roman Elizarov | bf9509d | 2020-02-14 15:52:10 +0300 | [diff] [blame] | 10 | } |
| 11 | |
| 12 | # Disable support for "Missing Main Dispatcher", since we always have Android main dispatcher |
| 13 | -assumenosideeffects class kotlinx.coroutines.internal.MainDispatchersKt { |
| 14 | boolean SUPPORT_MISSING return false; |
| 15 | } |
| 16 | |
| 17 | # Statically turn off all debugging facilities and assertions |
| 18 | -assumenosideeffects class kotlinx.coroutines.DebugKt { |
| 19 | boolean getASSERTIONS_ENABLED() return false; |
| 20 | boolean getDEBUG() return false; |
| 21 | boolean getRECOVER_STACK_TRACES() return false; |
Steve Elliott | ca095be | 2022-07-25 14:26:10 +0000 | [diff] [blame] | 22 | } |