-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Labels
S: waiting for clarificationStatus: additional information required to proceedStatus: additional information required to proceed
Description
Description
When using Kover 0.9.7 with Kotlin 2.3.10, the build fails with a "No matching variant" error when resolving kotlin-stdlib for the koverExternalArtifacts configuration.
Environment
- Kover version: 0.9.7
- Kotlin version: 2.3.10
- Gradle version: 9.3.1
- Project type: Kotlin Multiplatform with JVM modules
Error Message
Could not resolve all files for configuration ':koverExternalArtifacts'.
> Could not resolve org.jetbrains.kotlin:kotlin-stdlib:2.3.10.
Required by:
root project 'ff4k' > project :ff4k-store-sql-common
> No matching variant of org.jetbrains.kotlin:kotlin-stdlib:2.3.10 was found.
The consumer was configured to find attribute 'kotlinx.kover.variant.name' with value '',
attribute 'kotlinx.kover.variant.origin' with value 'TOTAL',
attribute 'org.gradle.usage' with value 'kover' but:
- Variant 'jvmApiElements':
- Incompatible because this component declares attribute 'org.gradle.usage'
with value 'java-api' and the consumer needed attribute 'org.gradle.usage'
with value 'kover'
...
The error occurs because Kover is looking for a variant with org.gradle.usage = 'kover', but kotlin-stdlib:2.3.10 does not expose any variants with this attribute.
Steps to Reproduce
- Create a Kotlin JVM module in a multi-module project
- Apply Kover 0.9.7 to the root project
- Use Kotlin 2.3.10
- Run
./gradlew koverXmlReport
Workaround
Excluding the affected module from Kover resolves the issue:
dependencies {
subprojects
.filter { it.name.startsWith("my-") }
.filter { "my-problematic-module" !in it.name } // Workaround
.forEach { kover(it) }
}Expected Behavior
Kover should be compatible with Kotlin 2.3.10 and properly resolve dependencies without requiring special variant attributes from kotlin-stdlib.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
S: waiting for clarificationStatus: additional information required to proceedStatus: additional information required to proceed