ribafish opened a new pull request, #15532:
URL: https://github.com/apache/grails-core/pull/15532
## Summary
Two issues prevent Gradle build cache from working for GroovyCompile,
Checkstyle, and CodeNarc tasks:
1. **`GrailsGradlePlugin.configureGroovyCompiler()`** adds the same output
file (`build/grailsGroovyCompilerConfig.groovy`) to every `GroovyCompile` task
in a project. When a project has multiple `GroovyCompile` tasks (e.g.
`compileGroovy`, `compileTestGroovy`, `compileIntegrationTestGroovy`), Gradle
detects overlapping outputs and refuses to cache any of them.
2. **`GrailsCodeStylePlugin`** redirects all Checkstyle/CodeNarc XML reports
to `rootProject.buildDir/reports/codestyle/{tool}/{project.name}.xml`. Projects
with multiple source sets (e.g. `grails-cache` has `ast` + `main`) have
multiple tasks writing to the same report file, again causing overlapping
outputs.
## Fix
- Use task-specific config file names
(`grailsGroovyCompilerConfig-{taskName}.groovy`) so each `GroovyCompile` task
has a unique output path.
- Include the task name in report file paths
(`{project.name}-{taskName}.xml`) so each Checkstyle/CodeNarc task has a unique
report location.
--
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]