Skip to content

Enable Gradle configuration cache#259

Merged
ogolberg merged 2 commits intomainfrom
enable-configuration-cache
May 7, 2026
Merged

Enable Gradle configuration cache#259
ogolberg merged 2 commits intomainfrom
enable-configuration-cache

Conversation

@ogolberg
Copy link
Copy Markdown
Member

@ogolberg ogolberg commented May 6, 2026

Summary

  • Make ExpediterTask configuration-cache compatible: reportRegularFileProperty, new @Input projectName: Property<String> (replaces project.name access at execution time), and the mutable List<ArtifactCollection> fields are replaced by a ConfigurableFileCollection for tracked inputs plus a ListProperty<ClassfileSource> populated lazily via a new ArtifactCollection.toClassfileSources() provider helper.
  • Bump testkit-plugin to 0.0.18 for the InstrumentWithJacocoOfflineTask config-cache fix from testkit-plugins#42 (0.0.17's publish workflow failed; 0.0.18 is the re-release). Add a root-project workaround for a latent CC bug in testkit's publishOnlyIf — its predicate reads PublishToMavenRepository.publication at execution time, which Gradle discards under CC; we replace the onlyIf spec with one derived from the task name.
  • Turn on org.gradle.configuration-cache=true in the project gradle.properties and add the same to each plugin/src/test/projects/ExpediterPluginIntegrationTest/* fixture so the plugin is exercised under CC end-to-end.

Test plan

  • ./gradlew build passes with Configuration cache entry stored on first run and Configuration cache entry reused on the next.
  • ./gradlew :plugin:test passes all 44 integration tests with CC enabled in both the outer build and the fixtures (JDK 21 — older Gradle versions in the test matrix don't support JDK 25).
  • Re-run CI to confirm.

🤖 Generated with Claude Code

ogolberg added 2 commits May 5, 2026 20:37
Make ExpediterTask compatible with the configuration cache by dropping
Task.project access at execution time and by replacing the mutable
ArtifactCollection list fields with a ConfigurableFileCollection for
tracked inputs plus a ListProperty<ClassfileSource> derived lazily via
a Provider.

Bump testkit-plugin to 0.0.18 for the InstrumentWithJacocoOfflineTask
CC fix (0.0.17's publish workflow failed; 0.0.18 is the re-release),
and work around a remaining latent CC bug in testkit's publishOnlyIf
by replacing its onlyIf spec in the root build.

Turn on configuration-cache in the project's gradle.properties and in
each testkit integration test project so the plugin is exercised under
CC end-to-end.

Generated with Claude Code
@codecov
Copy link
Copy Markdown

codecov Bot commented May 7, 2026

Codecov Report

❌ Patch coverage is 91.30435% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.94%. Comparing base (6ffd213) to head (6355997).

Files with missing lines Patch % Lines
...lin/com/toasttab/expediter/gradle/ExpediterTask.kt 88.23% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##               main     #259   +/-   ##
=========================================
  Coverage     90.94%   90.94%           
+ Complexity      340      337    -3     
=========================================
  Files            44       44           
  Lines          1137     1137           
  Branches        157      157           
=========================================
  Hits           1034     1034           
  Misses           52       52           
  Partials         51       51           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ogolberg ogolberg merged commit 2f3baaa into main May 7, 2026
3 checks passed
@ogolberg ogolberg deleted the enable-configuration-cache branch May 7, 2026 15:51
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.

1 participant