Skip to content

Instantly share code, notes, and snippets.

@DjangoLC
Created June 4, 2020 00:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DjangoLC/21066499f9ab2aac60aff28089efc116 to your computer and use it in GitHub Desktop.
Save DjangoLC/21066499f9ab2aac60aff28089efc116 to your computer and use it in GitHub Desktop.
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