Skip to content

Pass the project path to the kover aggregation dependency#733

Merged
alexander-yevsyukov merged 2 commits into
masterfrom
fix-kover-project-dependency-notation
Jul 10, 2026
Merged

Pass the project path to the kover aggregation dependency#733
alexander-yevsyukov merged 2 commits into
masterfrom
fix-kover-project-dependency-notation

Conversation

@alexander-yevsyukov

Copy link
Copy Markdown
Contributor

What

In KoverConfig.addAggregationDependency, build the root kover aggregation dependency from the subproject's path via the DependencyHandler.project(String) Kotlin DSL extension, instead of passing the Project instance itself as the dependency notation. Adds the org.gradle.kotlin.dsl.project import.

Why

Using a Project object as a dependency notation is deprecated since Gradle 9 and becomes a hard error in Gradle 10. The warning fires at configuration time of consumer builds (config's own build never calls KoverConfig.applyTo); it surfaced in delivery-server, where this exact fix is already applied and build-verified on the revive-admin-server-module branch. Landing it here keeps the next ./config/pull from overwriting that downstream copy with the deprecated form.

Notes for reviewers

  • This was the only Project-as-notation call site in buildSrc; the other dependencies.add(...) sites (SpineCompilerCoverage.kt, TestKitCoverage.kt, ExcludeInternalDoclet.kt) pass string or Dependency notations and are unaffected.
  • Behavior-preserving: same ProjectDependency on the same kover configuration, so the class KDoc ("adds a kover(project(...)) dependency") stays accurate.
  • Consumers may still see one "Project as dependency notation" deprecation from inside Kover 0.9.8 itself (PrepareKover.kt, kotlinx-kover#818) — that instance is upstream's, not ours, and is tracked in team memory on the address-gradle-deprecations branch.
  • Verified with ./gradlew :buildSrc:test detekt (the repo's documented command for buildSrc changes); spine-code-review and kotlin-engineer reviewers both approved with no findings.

🤖 Generated with Claude Code

Using a `Project` object as a dependency notation is deprecated since
Gradle 9 and fails in Gradle 10. Build the dependency from `sub.path`
via `DependencyHandler.project(String)` instead.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@alexander-yevsyukov alexander-yevsyukov self-assigned this Jul 10, 2026
@alexander-yevsyukov alexander-yevsyukov moved this to 🏗 In progress in v2.0 Jul 10, 2026
@alexander-yevsyukov alexander-yevsyukov moved this from 🏗 In progress to In Review in v2.0 Jul 10, 2026
@alexander-yevsyukov alexander-yevsyukov merged commit b2ac14b into master Jul 10, 2026
3 checks passed
@alexander-yevsyukov alexander-yevsyukov deleted the fix-kover-project-dependency-notation branch July 10, 2026 18:25
@github-project-automation github-project-automation Bot moved this from In Review to ✅ Done in v2.0 Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

2 participants