Skip to content

Instantly share code, notes, and snippets.

@mym0404
Created December 4, 2019 19:00
Show Gist options
  • Select an option

  • Save mym0404/49a78c580ca3a6e62e436159954ee605 to your computer and use it in GitHub Desktop.

Select an option

Save mym0404/49a78c580ca3a6e62e436159954ee605 to your computer and use it in GitHub Desktop.
@Component(
modules = [
AndroidSupportInjectionModule::class,
FragmentContributorModule::class,
DependencyModule::class
]
)
@AppScope
interface TestAppComponent {
@Component.Builder
interface TestBuilder {
@BindsInstance
fun app(app: Application): TestBuilder
fun build(): TestAppComponent
}
fun inject(app: MainApplication)
}
@Module
abstract class FragmentContributorModule {
@ContributesAndroidInjector
abstract fun contributeMainFragment(): MainFragment
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment