Skip to content

Instantly share code, notes, and snippets.

@saurabharora90
Last active June 15, 2020 06:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saurabharora90/e6951bd8296a99889557e6866af6c58b to your computer and use it in GitHub Desktop.
Save saurabharora90/e6951bd8296a99889557e6866af6c58b to your computer and use it in GitHub Desktop.
Dagger module
interface AppComponent {
@Component.Factory
interface Factory {
fun create(@BindsInstance context: Context): AppComponent
}
.....
fun getInitializers(): Set<ModuleInitializer>
@Module
abstract class InitializerModule {
@Binds
@IntoSet
abstract fun customerCareInitializer(initializer: CustomerCareInitializer): ModuleInitializer
@Binds
@IntoSet
internal abstract fun subscriptionInitializer(initializer: SubscriptionInitializer): ModuleInitializer
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment