kotlinx-kover icon indicating copy to clipboard operation
kotlinx-kover copied to clipboard

disableTestTask configures the task but should not

Open hfhbd opened this issue 1 year ago • 8 comments

Describe the bug I use the jvm-test-suite plugin and add an integrationTest but I don't want to include the task/test results in kover.

Errors ./gradlew build =>

Could not determine the dependencies of task ':koverGenerateArtifactJvm'.
> Could not create task ':integrationTest'.
   > Cannot query the value of this provider because it has no value available.

Expected behavior ./gradlew build => no error

Reproducer

plugins {
    kotlin("jvm") version "2.0.0"
    id("jvm-test-suite")
    id("org.jetbrains.kotlinx.kover") version "0.8.0"
}

kotlin.jvmToolchain(21)

repositories {
    mavenCentral()
}

testing.suites {
    named("test", JvmTestSuite::class) {
        useKotlinTest()
    }
    register("integrationTest", JvmTestSuite::class) {
        useKotlinTest()
        targets.configureEach {
            testTask {
                environment("foo", providers.gradleProperty("NOT-SET").get())
            }
        }
    }
}

kover.currentProject {
    instrumentation {
        disabledForTestTasks.add("integrationTest")
    }
    sources {
        excludedSourceSets.add("integrationTest")
    }
}

Reports If applicable, report files or screenshots.

Environment

  • Kover Gradle Plugin version: 0.8.0
  • Gradle version: 8.7
  • Kotlin project type: Kotlin JVM
  • Coverage Toolset (if customized in build script): nA
  • Other context important for this bug: nA

hfhbd avatar May 22 '24 07:05 hfhbd