codeconsole opened a new pull request, #16512:
URL: https://github.com/apache/grails-core/pull/16512
## Description
Split out of #16499 during review, where both reviewers were fine with this
part.
Selecting the new `grails-compile-static` Forge feature generates the
`compileStatic` block of the `grails` build configuration:
```groovy
grails {
compileStatic {
all = true
gsp = true // only when the application uses GSP
}
}
```
`all` covers controllers, services and tag libraries but deliberately not
GSP, so the feature writes `gsp = true` too when the application has GSP. A
REST API application gets `all = true` alone.
The block is written by `buildGradle.rocker.raw`, the same way the existing
`assets { }` block is. The feature is listed under Configuration and documented
in What's New and in `grailsCompileStatic.adoc`, after the `all`/`gsp` example
it generates.
### Testing
- `GrailsCompileStaticSpec` checks the block for a web application, `all`
without `gsp` for a REST API application, and no block without the feature.
- `CreateAppSpec` generates an application with the feature and runs
`compileGroovyPages`, so a generated application, its starter page included,
has to compile statically.
- `./gradlew :grails-forge-core:codeStyle` passes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]