@groovy.transform.CompileStatic class GrailsCompileStaticOptions extends java.lang.Object implements java.io.Serializable
Lazy opt-ins for compiling Grails artefacts with @GrailsCompileStatic automatically,
configured through the nested grails { compileStatic { }} block:
grails {
compileStatic {
controllers = true
services = true
tagLibs = true
}
}
Every flag is a lazy Property that defaults to false and is read when the Groovy
compile task runs (not at configuration time), so the values reflect the user's grails { }
block regardless of configuration ordering. The all flag is a shortcut that enables
controllers, services and tag libraries together.
A class that declares its own @CompileDynamic (or @CompileStatic /
@GrailsCompileStatic / @TypeChecked / @GrailsTypeChecked) annotation always
keeps that setting; these build-wide opt-ins never override an explicit per-class choice.
| Type | Name and description |
|---|---|
Property<java.lang.Boolean> |
allWhether every controller, service and tag library should be compiled with @GrailsCompileStatic.
|
Property<java.lang.Boolean> |
controllersWhether every controller under grails-app/controllers should be compiled with
@GrailsCompileStatic. |
Property<java.lang.Boolean> |
servicesWhether every service under grails-app/services should be compiled with
@GrailsCompileStatic. |
Property<java.lang.Boolean> |
tagLibsWhether every tag library under grails-app/taglib should be compiled with
@GrailsCompileStatic. |
| Constructor and description |
|---|
GrailsCompileStaticOptions(ObjectFactory objects) |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |
Whether every controller, service and tag library should be compiled with @GrailsCompileStatic.
A shortcut equivalent to enabling controllers, services
and tagLibs together. Disabled by default.
Whether every controller under grails-app/controllers should be compiled with
@GrailsCompileStatic. Disabled by default.
Whether every service under grails-app/services should be compiled with
@GrailsCompileStatic. Disabled by default.
Whether every tag library under grails-app/taglib should be compiled with
@GrailsCompileStatic. Disabled by default.