Created
June 4, 2020 00:11
-
-
Save DjangoLC/21066499f9ab2aac60aff28089efc116 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun Application.initDi() { | |
startKoin { | |
androidLogger() | |
androidContext(this@initDi) | |
modules(listOf(appModule, dataModule, summaryModule, oweModule)) | |
} | |
} | |
val appModule = module { | |
single<FirebaseDataSource> { | |
FirebaseDataSourceImpl() | |
} | |
single<CoroutineDispatcher> { | |
Dispatchers.Main | |
} | |
single<UserPreferences> { UserPreferences(androidApplication()) } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment