mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
refactor: Replace Injekt with Koin (Experiment) (#191)
* refactor: Use Koin An experiment, aims to ditch Injekt and replace it with Koin while providing Injekt API facade for extensions * fix: Mimic "InjektScope" * fix: Mimic more classes Completely fixed source search * refactor(deps): Use Injekt-Koin library * fix(r8): Keep Koin
This commit is contained in:
parent
bc65f17f60
commit
9d858cc810
8 changed files with 182 additions and 192 deletions
|
@ -59,13 +59,14 @@ import kotlinx.coroutines.Dispatchers
|
|||
import kotlinx.coroutines.flow.launchIn
|
||||
import kotlinx.coroutines.flow.onEach
|
||||
import org.conscrypt.Conscrypt
|
||||
import org.koin.core.context.startKoin
|
||||
import uy.kohesive.injekt.Injekt
|
||||
import uy.kohesive.injekt.api.get
|
||||
import uy.kohesive.injekt.injectLazy
|
||||
import yokai.core.CrashlyticsLogWriter
|
||||
import yokai.core.di.AppModule
|
||||
import yokai.core.di.DomainModule
|
||||
import yokai.core.di.PreferenceModule
|
||||
import yokai.core.di.appModule
|
||||
import yokai.core.di.domainModule
|
||||
import yokai.core.di.preferenceModule
|
||||
import yokai.core.migration.Migrator
|
||||
import yokai.core.migration.migrations.migrations
|
||||
import yokai.domain.base.BasePreferences
|
||||
|
@ -97,10 +98,8 @@ open class App : Application(), DefaultLifecycleObserver, SingletonImageLoader.F
|
|||
if (packageName != process) WebView.setDataDirectorySuffix(process)
|
||||
}
|
||||
|
||||
Injekt.apply {
|
||||
importModule(PreferenceModule(this@App))
|
||||
importModule(AppModule(this@App))
|
||||
importModule(DomainModule())
|
||||
startKoin {
|
||||
modules(preferenceModule(this@App), appModule(this@App), domainModule())
|
||||
}
|
||||
|
||||
basePreferences.crashReport().changes()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue