Merge Component
annotation class MergeComponent(val scope: KClass<*>, val modules: Array<KClass<*>> = [], val dependencies: Array<KClass<*>> = [], val exclude: Array<KClass<*>> = [])
Dagger components that should automatically include Dagger modules and component interfaces for the given scope require this annotation instead of @Component. The Kotlin compiler plugin will add the @Component annotation to this interface. The parameters modules and dependencies are preserved in the @Component annotation.
@MergeComponent(AppScope::class)
interface AppComponentContent copied to clipboard
It's possible to exclude any automatically added Dagger module or component interface with the exclude parameter if needed.
@MergeComponent(
scope = AppScope::class,
exclude = [
DaggerModule::class,
ComponentInterface::class
]
)
interface AppComponentContent copied to clipboard
Types
Link copied to clipboard
Mirrors dagger.Component.Builder and just conveys that this annotated builder should be mirrored in the merged component class.
Link copied to clipboard
Mirrors dagger.Component.Factory and just conveys that this annotated factory should be mirrored in the merged component class.