MetroPluginExtension
Constructors
Properties
Control diagnostic severity reporting of issues with the @AssistedInject
migration. NONE
is the future behavior, WARN
is the current default. See the kdoc on AssistedInject
for more details.
Enable/disable chunking of field initializers. Enabled by default.
Enable/disable full validation of bindings. If enabled, all declared @Provides
and @Binds
bindings will be validated even if they are not used by the graph. Disabled by default.
If true changes the return type of generated Graph Factories from the declared interface type to the generated Metro graph type. This is helpful for Dagger/Anvil interop.
Enable/disable Kotlin version compatibility checks. Defaults to true or the value of the metro.version.check
gradle property.
Enables whether the Metro compiler plugin can inject top-level functions. See the kdoc on Inject
for more details.
Enables whether the Metro compiler plugin will automatically generate assisted factories for injected constructors with assisted parameters. See the kdoc on AssistedFactory
for more details.
Enable/disable contribution hint generation in IR for contributed types. Enabled by default.
Enable/disable contribution hint generation in FIR for JVM compilations types. Disabled by default. Requires generateContributionHints to be true
Maximum number of IR errors to report before exiting IR processing. Default is 20, must be > 0.
Controls the behavior of optional dependencies on a per-compilation basis. Default is OptionalDependencyBehavior.DEFAULT mode.
Configures the Metro compiler plugin to warn, error, or do nothing when it encounters public
provider callables. See the kdoc on Provides
for more details.
If set, the Metro compiler will dump report diagnostics about resolved dependency graphs to the given destination.
Enable/disable shrinking of unused bindings. Enabled by default.
Maximum number of statements per init function when chunking field initializers. Default is 25, must be > 0.
Enable/disable automatic transformation of providers to be private. Enabled by default.
Enable/disable suggestion to lift @Inject to class when there is only one constructor. Enabled by default.