Skip to content

Instantly share code, notes, and snippets.

@skywall
Created October 24, 2020 21:15
Show Gist options
  • Save skywall/422bca873309b8e9261b2a5cc71f3e73 to your computer and use it in GitHub Desktop.
Save skywall/422bca873309b8e9261b2a5cc71f3e73 to your computer and use it in GitHub Desktop.
HomeModuleInjection
@HomeScope
@Component(
modules = [
HomeModule::class
],
dependencies = [
CoreComponent::class
]
)
interface HomeComponent {
@Component.Factory
interface Factory {
fun create(coreComponent: CoreComponent): HomeComponent
}
fun plus(module: HomeFragmentModule): HomeFragmentComponent
}
@Module
class HomeModule {
@Provides
fun homeDummyRepository(application: Application): HomeDummyRepository {
return HomeDummyRepository()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment