Pass the project path to the kover aggregation dependency#733
Merged
alexander-yevsyukov merged 2 commits intoJul 10, 2026
Conversation
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>
armiol
approved these changes
Jul 10, 2026
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.
What
In
KoverConfig.addAggregationDependency, build the rootkoveraggregation dependency from the subproject's path via theDependencyHandler.project(String)Kotlin DSL extension, instead of passing theProjectinstance itself as the dependency notation. Adds theorg.gradle.kotlin.dsl.projectimport.Why
Using a
Projectobject 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 callsKoverConfig.applyTo); it surfaced indelivery-server, where this exact fix is already applied and build-verified on therevive-admin-server-modulebranch. Landing it here keeps the next./config/pullfrom overwriting that downstream copy with the deprecated form.Notes for reviewers
Project-as-notation call site inbuildSrc; the otherdependencies.add(...)sites (SpineCompilerCoverage.kt,TestKitCoverage.kt,ExcludeInternalDoclet.kt) pass string orDependencynotations and are unaffected.ProjectDependencyon the samekoverconfiguration, so the class KDoc ("adds akover(project(...))dependency") stays accurate.PrepareKover.kt, kotlinx-kover#818) — that instance is upstream's, not ours, and is tracked in team memory on theaddress-gradle-deprecationsbranch../gradlew :buildSrc:test detekt(the repo's documented command forbuildSrcchanges);spine-code-reviewandkotlin-engineerreviewers both approved with no findings.🤖 Generated with Claude Code