You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Kover Plugin (0.8.2) Incompatible with Gradle TestKit for Functional Tests in Gradle 8.7+ and Missing Configuration in Aggregation Plugin
Environment
Gradle Version: 8.7, 8.8, 8.9-rc-1
Kover Version: 0.8.2
Kotlin Version: 1.9.22, 1.9.24, 2.0.0
OS: macOS
JDK Version: 21
Description
The Kover plugin (version 0.8.2) is causing failures in functional tests that use Gradle TestKit when running on Gradle versions 8.7 and above. This issue occurs in a Gradle plugin project using Kotlin, and affects both the Kover aggregation plugin applied in settings.gradle.kts and the Kover plugin applied directly in a project.
Additionally, the new Kover aggregation plugin is missing a crucial configuration that prevents coverage for functional tests. This configuration is available in the project-level Kover plugin but not in the aggregation plugin.
Steps to Reproduce
Clone the repository: [Repository URL]
Ensure Gradle 8.7+ is installed
Apply Kover plugin in one of two ways:
a. In settings.gradle.kts:
plugins {
id("org.jetbrains.kotlinx.kover") version "0.8.2"
}
Run the functional tests: ./gradlew :plugin-test:functionalTest
Expected Behavior
All functional tests in GradleFunctionalTestPluginFunctionalTest.kt should execute successfully, including tests for Gradle versions 8.7, 8.8, and 8.9-rc-1.
Coverage reports should include data from functional tests when using either the project-level Kover plugin or the aggregation plugin.
Actual Behavior
Functional tests fail to run correctly. Specific error messages indicate issues with loading the plugin extension:
> Configure project :
w: Classpath entry points to a non-existent location: /Users/.../Downloads/gradle-functional-test/plugin-test/build/classes/java/main
w: Classpath entry points to a non-existent location: /Users/.../Downloads/gradle-functional-test/plugin-test/build/classes/java/main
e: file:///private/var/folders/bf/zs2dlk055j11mz9wwxr369th0000gn/T/junit8183199304049029516/build.gradle.kts:1:12: Unresolved reference: example
e: file:///private/var/folders/bf/zs2dlk055j11mz9wwxr369th0000gn/T/junit8183199304049029516/build.gradle.kts:8:5: Unresolved reference: test
e: file:///private/var/folders/bf/zs2dlk055j11mz9wwxr369th0000gn/T/junit8183199304049029516/build.gradle.kts:11:1: Unresolved reference: helloWorld
test value from greeting extension: INFO
When using the Kover aggregation plugin, it's not possible to configure coverage for functional tests due to a missing configuration option.
Relevant Code
settings.gradle.kts (for aggregation plugin)
plugins {
id("org.jetbrains.kotlinx.kover.aggregation") version "0.8.2"
}
kover {
enableCoverage()
reports {
includedProjects.add(":plugin-test")
}
// The following configuration is missing and needed for functional test coverage// currentProject {// sourceSets.add(functionalTestSourceSet)// sources {// excludedSourceSets.add(functionalTestSourceSet.name)// }// }
}
This configuration is available in the project-level plugin but not in the aggregation plugin, making it impossible to properly configure coverage for functional tests when using the aggregation plugin.
Kover Plugin (0.8.2) Incompatible with Gradle TestKit for Functional Tests in Gradle 8.7+ and Missing Configuration in Aggregation Plugin
Environment
Description
The Kover plugin (version 0.8.2) is causing failures in functional tests that use Gradle TestKit when running on Gradle versions 8.7 and above. This issue occurs in a Gradle plugin project using Kotlin, and affects both the Kover aggregation plugin applied in settings.gradle.kts and the Kover plugin applied directly in a project.
Additionally, the new Kover aggregation plugin is missing a crucial configuration that prevents coverage for functional tests. This configuration is available in the project-level Kover plugin but not in the aggregation plugin.
Steps to Reproduce
a. In
settings.gradle.kts
:build.gradle.kts
:./gradlew :plugin-test:functionalTest
Expected Behavior
GradleFunctionalTestPluginFunctionalTest.kt
should execute successfully, including tests for Gradle versions 8.7, 8.8, and 8.9-rc-1.Actual Behavior
Relevant Code
settings.gradle.kts (for aggregation plugin)
plugin-test/build.gradle.kts (for project-level plugin)
plugin-test/src/functionalTest/kotlin/org/example/GradleFunctionalTestPluginFunctionalTest.kt
Troubleshooting Steps Taken
settings.gradle.kts
plugin-test/build.gradle.kts
Possible Causes
Questions
settings.gradle.kts
or directly in the project be causing unexpected behavior in subprojects or functional tests?Additional Information
build.gradle.kts.txt
settings.gradle.kts.txt
libs.versions.toml.txt
GradleFunctionalTestPluginFunctionalTest.kt.txt
GradleFunctionalTestPlugin.kt.txt
GradleFunctionalTestPluginTest.kt.txt
The text was updated successfully, but these errors were encountered: