AnnotationProcessorOptions

Added in 4.2.0

interface AnnotationProcessorOptions


Options for configuring Java annotation processor.

Summary

Public functions

Unit
argument(key: String, value: String)

Adds an argument that represent primitive types for annotation processors.

Unit
arguments(arguments: Map<StringString>)

Adds arguments that represent primitive types for annotation processors.

Unit
className(className: String)

Adds an annotation processor class to run.

Unit
classNames(vararg classNames: String)

Adds annotation processor classes to run.

Unit
compilerArgumentProvider(
    compilerArgumentProvider: CommandLineArgumentProvider
)

Adds an argument for annotation processors that you want to pass to the Android plugin using the CommandLineArgumentProvider class.

Unit
compilerArgumentProviders(
    vararg compilerArgumentProviders: CommandLineArgumentProvider
)

Adds arguments for annotation processors that you want to pass to the Android plugin using the CommandLineArgumentProvider class.

Public properties

MutableMap<StringString>

Specifies arguments that represent primitive types for annotation processors.

MutableList<String>

Specifies the annotation processor classes to run.

MutableList<CommandLineArgumentProvider>

Specifies arguments for annotation processors that you want to pass to the Android plugin using the CommandLineArgumentProvider class.

Public functions

argument

Added in 4.2.0
fun argument(key: String, value: String): Unit

Adds an argument that represent primitive types for annotation processors.

If one or more arguments represent files or directories, you must instead use compilerArgumentProviders.

arguments

Added in 4.2.0
fun arguments(arguments: Map<StringString>): Unit

Adds arguments that represent primitive types for annotation processors.

If one or more arguments represent files or directories, you must instead use compilerArgumentProviders.

className

Added in 4.2.0
fun className(className: String): Unit

Adds an annotation processor class to run.

By default, this property is empty and the plugin automatically discovers and runs annotation processors that you add to the annotation processor classpath. To learn more about adding annotation processor dependencies to your project, read Add annotation processors.

classNames

Added in 4.2.0
fun classNames(vararg classNames: String): Unit

Adds annotation processor classes to run.

By default, this property is empty and the plugin automatically discovers and runs annotation processors that you add to the annotation processor classpath. To learn more about adding annotation processor dependencies to your project, read Add annotation processors.

compilerArgumentProvider

Added in 4.2.0
fun compilerArgumentProvider(
    compilerArgumentProvider: CommandLineArgumentProvider
): Unit

Adds an argument for annotation processors that you want to pass to the Android plugin using the CommandLineArgumentProvider class.

The benefit of using this class is that it allows you or the annotation processor author to improve the correctness and performance of incremental and cached clean builds by applying incremental build property type annotations.

To learn more about how to use this class to annotate arguments for annotation processors and pass them to the Android plugin, read Pass arguments to annotation processors.

compilerArgumentProviders

Added in 4.2.0
fun compilerArgumentProviders(
    vararg compilerArgumentProviders: CommandLineArgumentProvider
): Unit

Adds arguments for annotation processors that you want to pass to the Android plugin using the CommandLineArgumentProvider class.

The benefit of using this class is that it allows you or the annotation processor author to improve the correctness and performance of incremental and cached clean builds by applying incremental build property type annotations.

To learn more about how to use this class to annotate arguments for annotation processors and pass them to the Android plugin, read Pass arguments to annotation processors.

Public properties

arguments

Added in 4.2.0
val argumentsMutableMap<StringString>

Specifies arguments that represent primitive types for annotation processors.

If one or more arguments represent files or directories, you must instead use compilerArgumentProviders.

classNames

Added in 4.2.0
val classNamesMutableList<String>

Specifies the annotation processor classes to run.

By default, this property is empty and the plugin automatically discovers and runs annotation processors that you add to the annotation processor classpath. To learn more about adding annotation processor dependencies to your project, read Add annotation processors.

compilerArgumentProviders

Added in 4.2.0
val compilerArgumentProvidersMutableList<CommandLineArgumentProvider>

Specifies arguments for annotation processors that you want to pass to the Android plugin using the CommandLineArgumentProvider class.

The benefit of using this class is that it allows you or the annotation processor author to improve the correctness and performance of incremental and cached clean builds by applying incremental build property type annotations.

To learn more about how to use this class to annotate arguments for annotation processors and pass them to the Android plugin, read Pass arguments to annotation processors.