13.1.2 Incremental Annotation Processing with Gradle
Micronaut supports Gradle incremental annotation processing which speeds up builds by compiling only classes that have changed, avoiding a full recompilation.
However, the support is disabled by default since Micronaut allows the definition of custom meta-annotations (to for example define custom AOP advice) that need to be configured for processing.
The following example demonstrates how to enable and configure incremental annotation processing for annotations you have defined under the com.example
package:
Enabling Incremental Annotation Processing
tasks.withType(JavaCompile) {
options.compilerArgs = [
'-Amicronaut.processing.incremental=true',
'-Amicronaut.processing.annotations=com.example.*',
]
}
If you do not enable processing for your custom annotations, they will be ignored by Micronaut, which may break your application. |