Add Gradle configuration cache support - #217
Open
ppantisawat wants to merge 7 commits into
Open
Conversation
added 7 commits
July 1, 2026 10:50
Add helpers to run Gradle TestKit with --configuration-cache and assert store/reuse. The acceptance test stays @ignore until the plugin is CC-safe.
Convert ScoverageReport and ScoverageAggregate to abstract task types with Property getters so task state is wired explicitly from the plugin.
Move coverage verification into CheckScoverageTask and identical-class cleanup into PruneIdenticalScoverageClassesTask. Resolve scalac plugin jars in compileScoverageScala doFirst without referencing Project.
Register instrumented test tasks instead of mutating test classpath in taskGraph.whenReady. Report tasks depend on scoverageTest; functional tests that filter coverage measurement target scoverageTest explicitly.
Register root aggregateScoverage when the plugin is applied to a parent project and connect subprojects via plugins.withId instead of projectsEvaluated.
Move scoverage artifact wiring into configureScoverageDependencies so dependency resolution stays isolated from task graph configuration.
Enable CC functional tests with stable store/reuse assertions, document scoverageTest companions and CC support, harden plugin closures for CC serialization, and run CI with --configuration-cache.
Contributor
|
thanks - this looks interesting but I worry that the change in behaviour is essentially reverting #57. I suppose that mutating the classpath breaks configuration caching? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Gradle 9 configuration cache support via typed tasks,
scoverageTestcompanion tasks, and configuration-time aggregate wiring. ReplacesdoLastcheck/prune logic withCheckScoverageTaskandPruneIdenticalScoverageClassesTask. CI runs with--configuration-cache.Behavioral change
Coverage no longer mutates the
testclasspath. UsescoverageTest(orscoverageIntTest, etc.) for instrumented runs, e.g.scoverageTest --tests ....Review guide
test: add configuration cache functional test harnessrefactor: use abstract properties on scoverage tasksrefactor: extract check and prune tasks for configuration cacherefactor: run coverage via scoverageTest companion tasksrefactor: wire aggregateScoverage at configuration timerefactor: extract scoverage dependency configurationfeat: enable configuration cache and CIKnown limitations
afterEvaluatestill used for dependency and task wiringdoFirststill capturesConfiguration