@groovy.transform.CompileStatic class GrailsExtension extends java.lang.Object
A extension to the Gradle plugin to configure Grails settings
| Type | Name and description |
|---|---|
boolean |
importGrailsCommonAnnotationsWhether grails annotation packages and common validation annotations should be default import packages. |
boolean |
importJavaTimeWhether java.time.* package should be a default import package |
Property<java.lang.Boolean> |
indyWhether to enable Groovy's invokedynamic (indy) bytecode instruction for dynamic Groovy method dispatch. |
boolean |
micronautAutoSetupWhether the Micronaut `annotationProcessor` dependencies should be auto-added to the project on detection of the `grails-micronaut` plugin, and the version defined by the `micronautPlatformVersion` Gradle property is enforced. |
boolean |
native2asciiWhether to invoke native2ascii on resource bundles |
boolean |
native2asciiAntWhether to use Ant to do the conversion |
boolean |
packageAssetsWhether assets should be packaged in META-INF/assets for plugins |
PluginDefiner |
pluginDefiner |
org.apache.tools.ant.Project |
project |
boolean |
springDependencyManagementWhether the spring dependency management plugin should be applied by default |
java.util.List<java.lang.String> |
starImportsCustom star imports to add to Groovy compilation configuration. |
| Constructor and description |
|---|
GrailsExtension(org.apache.tools.ant.Project project) |
| Type Params | Return Type | Name and description |
|---|---|---|
|
DependencyHandler |
getPlugins() |
|
boolean |
isDevelopmentRun() |
|
void |
plugins(groovy.lang.Closure configureClosure)Allows defining plugins in the available scopes |
|
void |
setIndy(boolean enabled) |
| 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 grails annotation packages and common validation annotations should be default import packages. When enabled, automatically imports: - jakarta.validation.constraints.* - grails.gorm.annotation.* (if grails-datamapping-core is in classpath) - grails.plugin.scaffolding.annotation.* (if grails-scaffolding is in classpath)
Whether java.time.* package should be a default import package
Whether to enable Groovy's invokedynamic (indy) bytecode instruction for dynamic Groovy method dispatch. Disabled by default to improve performance (see GitHub issue #15293). When enabled, Groovy uses JVM invokedynamic instead of traditional callsite caching. To enable invokedynamic in build.gradle: grails { indy = true }
Whether the Micronaut `annotationProcessor` dependencies should be auto-added to the project on detection of the `grails-micronaut` plugin, and the version defined by the `micronautPlatformVersion` Gradle property is enforced.
Whether to invoke native2ascii on resource bundles
Whether to use Ant to do the conversion
Whether assets should be packaged in META-INF/assets for plugins
Whether the spring dependency management plugin should be applied by default
Custom star imports to add to Groovy compilation configuration. Users can add their own package imports that will be combined with imports added by importJavaTime and importGrailsCommonAnnotations flags.
Allows defining plugins in the available scopes