Created
June 24, 2019 19:16
-
-
Save Rasalexman/f2350fba15a84d5af69d11fa58665ac2 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
class MainApplication : Application(), KodeinAware { | |
override val kodein: Kodein by Kodein.lazy { | |
bind<ViewModelFactory>() with singleton { ViewModelFactory(applicationContext) } | |
bind<MoviesDatabase>() with singleton { | |
Room.databaseBuilder( | |
applicationContext, | |
MoviesDatabase::class.java, "moviesDB" | |
).build() | |
} | |
import(androidXModule(this@MainApplication)) // for android components | |
import(netModule) | |
import(databaseModule) | |
import(localDataSourceModule) | |
import(remoteDataSourceModule) | |
import(repositoryModule) | |
import(useCasesModule) | |
import(viewModelsModule) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment