dagger

fun dagger(action: Action<DaggerHandler>? = null)(source)

Enables dagger for this project.

Parameters

action

optional block for extra configuration, such as anvil generators or android.


fun dagger(enableComponents: Boolean = false, projectHasJavaInjections: Boolean = false, action: Action<DaggerHandler>? = null)(source)

Enables dagger for this project.

Parameters

enableComponents

enables dagger components in this project, which in turn imposes use of the dagger compiler (slower!)

projectHasJavaInjections

indicates if this project has injected Java files. This means any Java file with @Inject or @AssistedInject. This imposes use of the dagger compiler (slower!) because Anvil only processes Kotlin files.

action

optional block for extra configuration, such as anvil generators or android.