Skip to content

#81: Verify configuration cache works - #84

Merged
kaklakariada merged 9 commits into
mainfrom
configuration-cache
Aug 21, 2026
Merged

#81: Verify configuration cache works#84
kaklakariada merged 9 commits into
mainfrom
configuration-cache

Conversation

@kaklakariada

Copy link
Copy Markdown
Contributor

Closes #81

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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=fail and add explicit reuse assertions for traceRequirements, 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

  • oftRequirementConfig is created via project.getConfigurations().create(...) with default flags (consumable + resolvable + visible). With --warning-mode fail this 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.

Comment thread .github/workflows/build.yml
@sonarqubecloud

Copy link
Copy Markdown

@kaklakariada
kaklakariada merged commit 80ab522 into main Aug 21, 2026
9 checks passed
@kaklakariada
kaklakariada deleted the configuration-cache branch August 21, 2026 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Declare compatibility with configuration cache

2 participants