GROOVY-12019: Enable gradle configuration cache#2544
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2544 +/- ##
==================================================
+ Coverage 68.1844% 68.6532% +0.4687%
- Complexity 33086 34621 +1535
==================================================
Files 1508 1508
Lines 126130 130297 +4167
Branches 22878 23721 +843
==================================================
+ Hits 86001 89453 +3452
- Misses 32490 33052 +562
- Partials 7639 7792 +153 🚀 New features to boost your workflow:
|
918bf99 to
c2a897e
Compare
There was a problem hiding this comment.
Pull request overview
This PR targets GROOVY-12019 by making the build more compatible with Gradle’s configuration cache, primarily by removing task-graph based logic, avoiding execution-time Project access patterns that break CC, and conditionally applying documentation tooling that is not yet CC-compatible.
Changes:
- Enables configuration cache by default (with CC problems downgraded to warnings) and refactors multiple build scripts/plugins to be CC-friendly.
- Makes documentation-related plugins/tasks conditional to avoid CC-incompatible third-party plugins unless needed.
- Reworks shaded-jar manifest generation to avoid capturing non-serializable Gradle state and improves task input modeling.
Reviewed changes
Copilot reviewed 19 out of 20 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| subprojects/groovy-groovydoc/build.gradle | Avoids Project.mkdir usage; uses File.mkdirs() for CC-safe directory creation. |
| subprojects/groovy-binary/build.gradle | Gates Asciidoctor task configuration and distribution doc inclusion behind documentation-build detection. |
| subprojects/groovy-ant/build.gradle | Makes external jar resolution CC-safe by capturing a FileCollection at configuration time. |
| gradle/verification-metadata.xml | Updates dependency verification metadata for updated/added build dependencies. |
| gradle.properties | Enables configuration cache by default and sets CC problems to warn. |
| build.gradle | Removes task graph usage for the parallel/generateLicenseReport incompatibility check. |
| build-logic/src/main/groovy/org/apache/groovy/gradle/SharedConfiguration.groovy | Replaces task-graph-based decisions with StartParameter-based booleans; adds documentation-build detection. |
| build-logic/src/main/groovy/org/apache/groovy/gradle/PerformanceTestsExtension.groovy | Makes performance test task arguments CC-safe via CommandLineArgumentProvider and modeled inputs. |
| build-logic/src/main/groovy/org/apache/groovy/gradle/JarJarTask.groovy | Refactors task properties for CC safety; switches OSGi manifest generation to BND Analyzer. |
| build-logic/src/main/groovy/org/apache/groovy/gradle/GroovydocAntPlugin.groovy | Improves CC safety by avoiding project.ant and by modeling source dirs as task inputs. |
| build-logic/src/main/groovy/org.apache.groovy-tested.gradle | Replaces direct System.properties access with Providers; removes task-graph hook; CC-safe logging and cleanup. |
| build-logic/src/main/groovy/org.apache.groovy-published-library.gradle | Removes signing logic dependency on task graph; adds publish ordering constraint for local file repository publishes. |
| build-logic/src/main/groovy/org.apache.groovy-publish-validation.gradle | Adjusts publish validation to reduce CC-unfriendly configuration-time captures. |
| build-logic/src/main/groovy/org.apache.groovy-library.gradle | Migrates JarJar manifest configuration from Gradle OSGi DSL to BND instructions. |
| build-logic/src/main/groovy/org.apache.groovy-documented.gradle | Simplifies Javadoc tag configuration using tags(...) in the options block. |
| build-logic/src/main/groovy/org.apache.groovy-distribution.gradle | Applies Asciidoctor/PDF plugins only for documentation builds; avoids execution-time project.version access. |
| build-logic/src/main/groovy/org.apache.groovy-core.gradle | Makes compile configuration CC-friendlier; refactors grammar output relocation to avoid configuration-time file operations. |
| build-logic/src/main/groovy/org.apache.groovy-base.gradle | Applies Asciidoctor plugin only when needed; adds asciidocElements variant; makes JarJar task configuration CC-safe. |
| build-logic/src/main/groovy/org.apache.groovy-asciidoctor.gradle | Marks Asciidoctor tasks as not CC-compatible (until upstream plugin supports CC). |
| build-logic/build.gradle | Adds BND library and bumps JMH Gradle plugin version. |
8b9484b to
474ddf8
Compare
|
Claude's comments: Review of PR #2544 (GROOVY-12019: Enable Gradle configuration cache)Solid build-infra work. CI is green, BND migration is clean, and most of the refactors carry inline comments explaining the CC constraint they exist to satisfy. A few items worth a second look:
None of these are blocking — (2) is the only one I'd want addressed before merge. |
8908904 to
5cd5b7e
Compare
JMH summary — classic (commit
|
| Group | Speedup | n |
|---|---|---|
| bench | 0.941 × | 26 |
| core | 0.961 × | 77 |
| grails | 0.952 × | 80 |
Baseline: dev/bench/jmh/<part>/classic/data.js on gh-pages, trailing 90 days. Daily dashboard · Per-suite raw data
There was a problem hiding this comment.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.50.
| Benchmark suite | Current: 5cd5b7e | Previous: f1a4483 | Ratio |
|---|---|---|---|
org.apache.groovy.bench.dispatch.CallsiteBench.dispatch_1_monomorphic_java |
35819.12888593179 ops/ms |
23120.647629008003 ops/ms |
1.55 |
org.apache.groovy.bench.StaticMethodCallIndyColdBench.staticSum_java ( {"n":"2000"} ) |
52.189812499999995 us/op |
33.07520000000001 us/op |
1.58 |
org.apache.groovy.bench.StaticMethodCallIndyColdBench.staticSum_java ( {"n":"20000"} ) |
439.77117500000014 us/op |
262.498375 us/op |
1.68 |
This comment was automatically generated by workflow using github-action-benchmark.
|
JMH summary — indy (commit
|
| Group | Speedup | n |
|---|---|---|
| bench | 0.994 × | 26 |
| core | 0.975 × | 77 |
| grails | 1.006 × | 80 |
Baseline: dev/bench/jmh/<part>/indy/data.js on gh-pages, trailing 90 days. Daily dashboard · Per-suite raw data
✅ All tests passed ✅🏷️ Commit: 5cd5b7e Learn more about TestLens at testlens.app. |



https://issues.apache.org/jira/browse/GROOVY-12019