Skip to content

Instantly share code, notes, and snippets.

@naltynbekkz
Created April 25, 2020 18:22
Show Gist options
  • Save naltynbekkz/7ede3c2660b6bee5c925193f41893bed to your computer and use it in GitHub Desktop.
Save naltynbekkz/7ede3c2660b6bee5c925193f41893bed to your computer and use it in GitHub Desktop.
@Singleton
@Component(modules = [SubComponentsModule::class])
interface AppComponent {
fun inject(app: BaseApplication)
@Component.Factory
interface Factory {
fun create(@BindsInstance context: Context): AppComponent
}
fun blogsComponent(): BlogsComponent.Factory
fun secondComponent(): SecondComponent.Factory
}
@Module(subcomponents = [BlogsComponent::class,SecondComponent::class])
object SubComponentsModule
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment