Tobias Preuss
06/13/2023, 7:21 AMkoin-android:3.3.0
:
singleOf<AndroidPreferences> { AndroidPreferencesImpl(GlobalScope) }
When I update to koin-android:3.4.1
this becomes a compilation error. What is the recommended migration path here?
AndroidPreferences
is an interface
, AndroidPreferencesImpl
is a class
Martin Sloup
06/13/2023, 9:10 AMsingle { AndroidPreferenceImpl(GlobalScope) } bind AndroidPreferences::class
If you have GlobalScope defined in Koin module, then:
singleOf(::AndroidPreferenceImpl) bind AndroidPreferences::class
Tobias Preuss
06/13/2023, 9:51 AMTobias Preuss
06/13/2023, 9:53 AMGlobalScope
in a module? In the constructor parameter of a class I have no knowledge about the specific type as in scope: CoroutineScope
.arnaud.giuliani
06/16/2023, 1:54 PMsingleOf(::AndroidPreferenceImpl){ bind<AndroidPreferences>() }
Tobias Preuss
06/16/2023, 3:00 PMGlobalScope
?arnaud.giuliani
06/16/2023, 3:03 PMsingle { GlobalScope }
Tobias Preuss
06/16/2023, 3:19 PMTobias Preuss
06/19/2023, 6:58 AMarnaud.giuliani
06/19/2023, 8:14 AMDispatchers
typeTobias Preuss
06/19/2023, 8:30 AMscope
within the class instance?