Sync dependency versions and TestKit coverage into buildSrc#681
Conversation
Port the `buildSrc` changes made downstream back into the canonical `config` repository. From `base-libraries`: - Bump external, build, kotlinx, local, and test dependency versions (incl. Error Prone Gradle plugin -> 5.1.0 with its renamed `enabled` option adapted in `Linters.kt`, Guava, Kotlin, Protobuf, and the sibling Spine snapshots). - Mirror the bumped plugin/Guava/Kotlin versions in `buildSrc/build.gradle.kts`. - Complete the JaCoCo -> Kover migration by removing the now-dead JaCoCo coverage pipeline (`CodebaseFilter`, `FileExtension`, `FileExtensions`, `FileFilter`, `JacocoConfig`, `PathMarker`, `TaskName`); these were referenced only by each other. From `tool-base`: - Feed Gradle TestKit worker-JVM coverage into the Kover rollup: `KoverConfig` now merges per-module `.exec` data as `additionalBinaryReports`, and a new `gradle/testing/TestKitCoverage.kt` attaches the JaCoCo agent to TestKit workers. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 30b5033502
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The JaCoCo->Kover migration deleted `FileExtensions.kt`, which provided the `File.classNamesIn(...)` extension. The class-FQN derivation it tested now lives as the private `File.fqnsRelativeTo(...)` inside `KoverConfig`. The orphaned test left `:buildSrc:compileTestKotlin` unable to compile; remove it to match the migration (the source `base-libraries` branch carries no such test). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 87d96819a2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
This PR syncs downstream buildSrc/ changes back into the canonical config repo: it updates the shared dependency/version catalog, removes the deprecated JaCoCo aggregation pipeline, and extends Kover aggregation to include Gradle TestKit worker JVM coverage data.
Changes:
- Bump a broad set of dependency and plugin versions (including Error Prone Gradle plugin, Guava, Kotlin, Protobuf, and multiple Spine snapshots) and mirror key versions in
buildSrc/build.gradle.kts. - Complete the JaCoCo → Kover migration by removing the old JaCoCo aggregation/filtering implementation and its tests/utilities.
- Add TestKit worker coverage support: new
enableTestKitCoverage()helper and Kover aggregation updated to merge TestKit-produced.execdata viaadditionalBinaryReports.
Reviewed changes
Copilot reviewed 53 out of 62 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| buildSrc/src/test/kotlin/io/spine/gradle/report/coverage/FileExtensionsTest.kt | Removes tests for deprecated JaCoCo helper extensions. |
| buildSrc/src/main/kotlin/io/spine/gradle/testing/TestKitCoverage.kt | Adds helper to attach JaCoCo agent to TestKit worker JVMs and emit .exec data. |
| buildSrc/src/main/kotlin/io/spine/gradle/report/coverage/TaskName.kt | Removes deprecated JaCoCo task-name catalog. |
| buildSrc/src/main/kotlin/io/spine/gradle/report/coverage/PathMarker.kt | Removes deprecated JaCoCo path marker enum. |
| buildSrc/src/main/kotlin/io/spine/gradle/report/coverage/KoverConfig.kt | Extends Kover aggregation to merge TestKit worker .exec data into reports. |
| buildSrc/src/main/kotlin/io/spine/gradle/report/coverage/JacocoConfig.kt | Removes deprecated JaCoCo root-report aggregation pipeline. |
| buildSrc/src/main/kotlin/io/spine/gradle/report/coverage/FileFilter.kt | Removes deprecated JaCoCo-era generated/human file filtering utility. |
| buildSrc/src/main/kotlin/io/spine/gradle/report/coverage/FileExtensions.kt | Removes deprecated file parsing/class-name inference helpers for JaCoCo pipeline. |
| buildSrc/src/main/kotlin/io/spine/gradle/report/coverage/FileExtension.kt | Removes deprecated file-extension enum used by the JaCoCo pipeline. |
| buildSrc/src/main/kotlin/io/spine/gradle/report/coverage/CodebaseFilter.kt | Removes deprecated compiled-class filtering for JaCoCo aggregation. |
| buildSrc/src/main/kotlin/io/spine/gradle/java/Linters.kt | Adapts Error Prone plugin API change (isEnabled → enabled). |
| buildSrc/src/main/kotlin/io/spine/dependency/test/Truth.kt | Bumps Truth version. |
| buildSrc/src/main/kotlin/io/spine/dependency/test/KotlinCompileTesting.kt | Bumps Kotlin compile testing fork version. |
| buildSrc/src/main/kotlin/io/spine/dependency/test/JUnit.kt | Bumps JUnit BOM version and legacy JUnit 4 version. |
| buildSrc/src/main/kotlin/io/spine/dependency/test/Jacoco.kt | Bumps JaCoCo version used across tooling. |
| buildSrc/src/main/kotlin/io/spine/dependency/local/Validation.kt | Bumps Validation snapshot version. |
| buildSrc/src/main/kotlin/io/spine/dependency/local/ToolBase.kt | Bumps ToolBase snapshot versions. |
| buildSrc/src/main/kotlin/io/spine/dependency/local/CoreJvmCompiler.kt | Bumps CoreJvmCompiler snapshot versions. |
| buildSrc/src/main/kotlin/io/spine/dependency/local/Compiler.kt | Bumps fallback snapshot versions for Compiler. |
| buildSrc/src/main/kotlin/io/spine/dependency/local/Base.kt | Bumps Base snapshot versions. |
| buildSrc/src/main/kotlin/io/spine/dependency/lib/Slf4J.kt | Bumps SLF4J version. |
| buildSrc/src/main/kotlin/io/spine/dependency/lib/Roaster.kt | Bumps Roaster version. |
| buildSrc/src/main/kotlin/io/spine/dependency/lib/Protobuf.kt | Bumps Protobuf and protobuf-gradle-plugin versions. |
| buildSrc/src/main/kotlin/io/spine/dependency/lib/Plexus.kt | Bumps plexus-utils version. |
| buildSrc/src/main/kotlin/io/spine/dependency/lib/PalantirJavaFormat.kt | Bumps palantir-java-format version. |
| buildSrc/src/main/kotlin/io/spine/dependency/lib/Okio.kt | Bumps Okio version. |
| buildSrc/src/main/kotlin/io/spine/dependency/lib/Netty.kt | Bumps Netty version. |
| buildSrc/src/main/kotlin/io/spine/dependency/lib/Log4j2.kt | Bumps Log4j2 version. |
| buildSrc/src/main/kotlin/io/spine/dependency/lib/KotlinSemver.kt | Bumps kotlin-semver version. |
| buildSrc/src/main/kotlin/io/spine/dependency/lib/KotlinPoet.kt | Bumps KotlinPoet version. |
| buildSrc/src/main/kotlin/io/spine/dependency/lib/Kotlin.kt | Bumps Kotlin runtime/embedded versions and JetBrains annotations version. |
| buildSrc/src/main/kotlin/io/spine/dependency/lib/JetBrainsAnnotations.kt | Bumps JetBrains annotations version. |
| buildSrc/src/main/kotlin/io/spine/dependency/lib/JavaDiffUtils.kt | Bumps java-diff-utils version. |
| buildSrc/src/main/kotlin/io/spine/dependency/lib/Jackson.kt | Bumps Jackson BOM and annotations version. |
| buildSrc/src/main/kotlin/io/spine/dependency/lib/J2ObjC.kt | Bumps j2objc-annotations version. |
| buildSrc/src/main/kotlin/io/spine/dependency/lib/HttpClient.kt | Bumps google-http-java-client version. |
| buildSrc/src/main/kotlin/io/spine/dependency/lib/Guava.kt | Bumps Guava version. |
| buildSrc/src/main/kotlin/io/spine/dependency/lib/Gson.kt | Bumps Gson version. |
| buildSrc/src/main/kotlin/io/spine/dependency/lib/GrpcKotlin.kt | Bumps grpc-kotlin version. |
| buildSrc/src/main/kotlin/io/spine/dependency/lib/Grpc.kt | Bumps gRPC BOM version. |
| buildSrc/src/main/kotlin/io/spine/dependency/lib/Flogger.kt | Bumps Flogger version. |
| buildSrc/src/main/kotlin/io/spine/dependency/lib/Firebase.kt | Bumps firebase-admin version. |
| buildSrc/src/main/kotlin/io/spine/dependency/lib/CommonsLogging.kt | Bumps commons-logging version. |
| buildSrc/src/main/kotlin/io/spine/dependency/lib/CommonsCodec.kt | Bumps commons-codec version. |
| buildSrc/src/main/kotlin/io/spine/dependency/lib/CommonsCli.kt | Bumps commons-cli version. |
| buildSrc/src/main/kotlin/io/spine/dependency/lib/Clikt.kt | Bumps Clikt version. |
| buildSrc/src/main/kotlin/io/spine/dependency/lib/Caffeine.kt | Bumps Caffeine version. |
| buildSrc/src/main/kotlin/io/spine/dependency/lib/Auto.kt | Bumps AutoValue version. |
| buildSrc/src/main/kotlin/io/spine/dependency/lib/Asm.kt | Bumps ASM version. |
| buildSrc/src/main/kotlin/io/spine/dependency/lib/Aedile.kt | Bumps Aedile version. |
| buildSrc/src/main/kotlin/io/spine/dependency/kotlinx/Serialization.kt | Updates copyright header (and related kotlinx versions elsewhere in the PR). |
| buildSrc/src/main/kotlin/io/spine/dependency/kotlinx/DateTime.kt | Bumps kotlinx-datetime version. |
| buildSrc/src/main/kotlin/io/spine/dependency/kotlinx/Coroutines.kt | Updates copyright header (and related version catalog alignment). |
| buildSrc/src/main/kotlin/io/spine/dependency/kotlinx/AtomicFu.kt | Updates copyright header (and related version catalog alignment). |
| buildSrc/src/main/kotlin/io/spine/dependency/build/Pmd.kt | Bumps PMD version. |
| buildSrc/src/main/kotlin/io/spine/dependency/build/PluginPublishPlugin.kt | Bumps Gradle plugin-publish plugin version. |
| buildSrc/src/main/kotlin/io/spine/dependency/build/Ksp.kt | Bumps KSP version. |
| buildSrc/src/main/kotlin/io/spine/dependency/build/GradleDoctor.kt | Bumps Gradle Doctor version. |
| buildSrc/src/main/kotlin/io/spine/dependency/build/ErrorProne.kt | Bumps Error Prone Gradle plugin version. |
| buildSrc/src/main/kotlin/io/spine/dependency/build/CheckerFramework.kt | Bumps Checker Framework version. |
| buildSrc/src/main/kotlin/io/spine/dependency/build/AnimalSniffer.kt | Bumps Animal Sniffer version. |
| buildSrc/build.gradle.kts | Mirrors key version bumps (Kotlin embedded, Guava, Error Prone plugin, Protobuf plugin) into buildSrc buildscript. |
Previously `enableTestKitCoverage` wiped the shared `build/jacoco-testkit` directory in every `Test` task's `doFirst`. Because the TestKit workers append to a single per-module exec file and `KoverConfig` only scans the directory later, a module with more than one TestKit `Test` task kept only the coverage of the last task to run — each task erased its predecessors. Move the cleanup into a dedicated `cleanTestKitCoverage` `Delete` task that every `Test` task depends on, so the directory is wiped exactly once per build invocation and the sequentially-run tasks accumulate into the same exec file. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2bab826d53
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The previous `cleanTestKitCoverage` `Delete` task ran via `dependsOn` even when the `Test` task was up-to-date or restored from cache. A follow-up `koverXmlReport`/`check` run would then delete `build/jacoco-testkit` without the skipped `Test` task regenerating the `.exec` files, so the Kover report dropped all TestKit worker coverage. Move the wipe back into the `Test` task's `doFirst` — which runs only when the task actually executes — guarded by a one-shot `AtomicBoolean` so that, with several TestKit `Test` tasks in one module, only the first to run clears the shared directory and the rest accumulate into the same appended exec file. This addresses both the up-to-date/cached-skip erasure and the multi-task erasure. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a659078c6a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The worker `.exec` data is flushed out-of-process on worker-daemon
shutdown, after the `Test` task action completes, so it cannot be declared
as a task output and captured by the build cache. Left cacheable, a cache
hit (e.g. `clean check --build-cache`) would skip execution and restore no
exec files, so `KoverConfig` would scan an empty directory and drop all
TestKit worker coverage.
Mark the coverage-enabled `Test` tasks non-cacheable via `outputs.cacheIf
{ false }`. A cache hit can no longer drop coverage because the task is not
served from the cache; up-to-date (non-cache) runs remain safe, since the
previous run's files persist and the guarded `doFirst` never deletes them
on a skip.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b32f33bd66
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Ports the
buildSrcchanges made downstream back into the canonicalconfigrepository, in two parts.From
base-librariesbuildSrc/.../dependency/**(build, kotlinx, lib, local, test). Notably the Error Prone Gradle plugin4.1.0→5.1.0(with its renamedenabledoption adapted inLinters.kt), Guava33.5.0-jre→33.6.0-jre, plus Kotlin, Protobuf, and the sibling Spine snapshots. All move forward; none regress.buildSrc/build.gradle.kts.CodebaseFilter,FileExtension,FileExtensions,FileFilter,JacocoConfig,PathMarker,TaskName(and the orphanedFileExtensionsTest). These were referenced only by each other; the surviving class-FQN logic lives privately inKoverConfig.From
tool-baseKoverConfignow merges per-module.execdata asadditionalBinaryReports(both per subproject and at the root), and a newgradle/testing/TestKitCoverage.ktattaches the JaCoCo agent to TestKit workers. Without this, plugin code exercised out-of-process throughGradleRunner(most notablyPlugin<Settings>implementations) is not credited to coverage.TestKitCoveragehardening (from review)The TestKit-coverage helper ported from
tool-basehad several edge cases around when the shared exec directory (build/jacoco-testkit) is wiped vs. when the worker.execfiles are present. The finalenableTestKitCoverage()resolves all of them:.execon worker-daemon shutdown — after theTestaction completes and before the Kover report runs — so the directory cannot be a reliableTesttask output. This constraint drives the three points below.doFirst, not adependsOnclean task. A clean task wired viadependsOnruns even whenTestis up-to-date or cache-restored, deleting the.execfiles without regenerating them, so a follow-upkoverXmlReport/checkwould drop all TestKit coverage. AdoFirstaction runs only when the task truly executes.Testtask, only the first to execute clears the directory (guarded by anAtomicBoolean); the workers append to a single per-module exec file, so the remaining tasks accumulate into it instead of erasing one another.Testtasks are non-cacheable (outputs.cacheIf { false }). Since the exec dir cannot be a declared output, a build-cache hit would skip execution and restore no exec files. Marking the task non-cacheable means a cache hit can no longer drop coverage; up-to-date (non-cache) runs stay correct, as the previous run's files persist and the guardeddoFirstnever deletes them on a skip.Net effect: TestKit worker coverage is preserved across all three execution states — fresh run, up-to-date skip, and build-cache hit — and accumulates correctly across multiple
Testtasks in one module.Scope notes for reviewers
buildSrc/.version.gradle.kts,dependencies.md,docs/dependencies/**, librarysrc/**,.agents/.claude/.codex, and tool-base's module build scripts /plugin-testlibcode.KoverConfigis a strict superset of config's, so the merge added the TestKit logic without losing anything.0.9.8in both repos (soadditionalBinaryReportsis available); config's JaCoCo0.8.15≥ tool-base's0.8.14.Verification
./gradlew :buildSrc:compileKotlin→ BUILD SUCCESSFUL (JDK 17)../gradlew :buildSrc:test→ BUILD SUCCESSFUL../gradlew detekt→ BUILD SUCCESSFUL.spine-code-review,kotlin-engineer,dependency-auditall APPROVE.ConfigTester/buildDependantsintegration run (which checks out and builds downstream repos against local config) is network-heavy and left to CI.🤖 Generated with Claude Code