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.1641% 68.5059% +0.3419%
- Complexity 32862 34018 +1156
==================================================
Files 1499 1504 +5
Lines 125396 128875 +3479
Branches 22666 23562 +896
==================================================
+ Hits 85475 88287 +2812
- Misses 32408 32968 +560
- Partials 7513 7620 +107 🚀 New features to boost your workflow:
|
8fa4f51 to
918bf99
Compare
918bf99 to
c2a897e
Compare
✅ All tests passed ✅🏷️ Commit: c2a897e Learn more about TestLens at testlens.app. |
|
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. |
| normalized.endsWith('dist') || | ||
| normalized.endsWith(':dist') |



No description provided.