#81: Verify configuration cache works - #84
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR implements and verifies Gradle configuration-cache compatibility for the OpenFastTrace Gradle plugin, adds explicit cache-reuse coverage in TestKit functional tests, and declares configuration-cache support in the plugin publishing metadata (per #81).
Changes:
- Make TestKit runs enforce configuration-cache reuse with
--configuration-cache-problems=failand add explicit reuse assertions fortraceRequirements, including imported ZIP requirements. - Refactor plugin task wiring and task inputs to be more configuration-cache friendly (lazy providers + file collection inputs).
- Declare configuration-cache compatibility in Gradle Plugin Portal metadata and align CI to run with configuration cache enabled.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/test/java/org/itsallcode/openfasttrace/gradle/PluginTestFixture.java | Forces config cache + problems=fail for TestKit invocations and adds a broader outcome assertion helper. |
| src/test/java/org/itsallcode/openfasttrace/gradle/OpenFastTracePluginTest.java | Adds explicit configuration-cache reuse tests for traceRequirements with custom config and imported requirements ZIP. |
| src/main/java/org/itsallcode/openfasttrace/gradle/task/TraceTask.java | Updates imported requirements to a file-collection input for better cacheability and lazy resolution. |
| src/main/java/org/itsallcode/openfasttrace/gradle/OpenFastTracePlugin.java | Improves laziness for task properties and defers imported-requirements resolution via configurations. |
| CHANGELOG.md | Documents #81 in the Unreleased changelog. |
| build.gradle | Declares configuration-cache compatibility in plugin-publish metadata and adjusts default toolchain Java version. |
| .vscode/settings.json | Removes a VS Code Java save-action setting. |
| .github/workflows/build.yml | Runs CI build with configuration cache + problems=fail and simplifies report artifacts. |
Suppressed comments (1)
src/main/java/org/itsallcode/openfasttrace/gradle/OpenFastTracePlugin.java:159
oftRequirementConfigis created viaproject.getConfigurations().create(...)with default flags (consumable + resolvable + visible). With--warning-mode failthis commonly triggers Gradle warnings about configurations being both resolvable and consumable, and it also exposes an internal configuration to build authors. Prefer reusing an existing configuration and explicitly marking it resolvable-only/non-visible.
private static Configuration getImportedRequirements(final Project project)
{
final String CONFIG_NAME = "oftRequirementConfig";
final Configuration configuration = project.getConfigurations().create(CONFIG_NAME);
getConfig(project).getImportedRequirements().get().forEach(dependency -> {
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
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.



Closes #81