Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- apply plugin: 'com.android.application'
- apply plugin: 'kotlin-android'
- apply plugin: 'kotlin-kapt' --<<<<<<<
- apply plugin: 'kotlin-android-extensions'
- --------------------------------------------------------------------------------
- def dagger_version = '2.28.3'
- //Dagger
- implementation "com.google.dagger:dagger:$dagger_version"
- kapt "com.google.dagger:dagger-compiler:$dagger_version"
- --------------------------------------------------------------------------------
- @Singleton
- @Component(modules = [ModuleRepository::class])
- interface AppComponent {
- fun getDatabase(): DBRepository
- }
- --------------------------------------------------------------------------------
- @Module
- class ModuleRepository {
- @Provides
- @Singleton
- fun getDB(): DBRepository {
- return DBRepository()
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment