Kotlin / kotlinx-kover

Apache License 2.0
1.37k stars 53 forks source link

Applying the kover plugin forces quarkus projects to build native images #683

Closed cldfzn closed 2 months ago

cldfzn commented 2 months ago

If I have a quarkus project, and disable the native build, enabling kover on the project causes the native compile tasks to be run. This should not happen. I haven't looked in to it enough to know what causes this.

Attempting to disable for the testNative task from quarkus:

kover.currentProject {
    instrumentation {
        disabledForTestTasks.addAll("testNative")
    }
}

Tasks without kover enabled:

:detektConfiguration SKIPPED
:detekt SKIPPED
:licensee SKIPPED
:artifactInfo SKIPPED
:processResources SKIPPED
:quarkusGenerateCode SKIPPED
:quarkusGenerateCodeDev SKIPPED
:checkKotlinGradlePluginConfigurationErrors SKIPPED
:compileQuarkus-test-generated-sourcesKotlin SKIPPED
:compileQuarkusTestGeneratedSourcesJava SKIPPED
:quarkusGenerateCodeTests SKIPPED
:spotlessInternalRegisterDependencies SKIPPED
:spotlessJava SKIPPED
:spotlessJavaCheck SKIPPED
:spotlessKotlin SKIPPED
:spotlessKotlinCheck SKIPPED
:spotlessCheck SKIPPED
:crd2java SKIPPED
:compileKotlin SKIPPED
:compileJava SKIPPED
:classes SKIPPED
:jar SKIPPED
:compileTestKotlin SKIPPED
:compileTestJava SKIPPED
:processTestResources SKIPPED
:testClasses SKIPPED
:test SKIPPED
:check SKIPPED

Tasks with kover enabled

:detektConfiguration SKIPPED
:detekt SKIPPED
:artifactInfo SKIPPED
:processResources SKIPPED
:quarkusGenerateCode SKIPPED
:quarkusGenerateCodeDev SKIPPED
:checkKotlinGradlePluginConfigurationErrors SKIPPED
:crd2java SKIPPED
:compileKotlin SKIPPED
:compileJava SKIPPED
:classes SKIPPED
:jar SKIPPED
:compileQuarkus-test-generated-sourcesKotlin SKIPPED
:compileQuarkusTestGeneratedSourcesJava SKIPPED
:quarkusGenerateCodeTests SKIPPED
:compileTestKotlin SKIPPED
:compileTestJava SKIPPED
:processTestResources SKIPPED
:testClasses SKIPPED
:compileIntegrationTestKotlin SKIPPED
:compileIntegrationTestJava SKIPPED
:processIntegrationTestResources SKIPPED
:integrationTestClasses SKIPPED
:compileNative-testKotlin SKIPPED
:compileNativeTestJava SKIPPED
:compileQuarkus-generated-sourcesKotlin SKIPPED
:compileQuarkusGeneratedSourcesJava SKIPPED
:koverFindJar SKIPPED
:test SKIPPED
:koverGenerateArtifactJvm SKIPPED
:koverGenerateArtifact SKIPPED
:koverCachedVerify SKIPPED
:koverVerify SKIPPED
:licensee SKIPPED
:spotlessInternalRegisterDependencies SKIPPED
:spotlessJava SKIPPED
:spotlessJavaCheck SKIPPED
:spotlessKotlin SKIPPED
:spotlessKotlinCheck SKIPPED
:spotlessCheck SKIPPED
:check SKIPPED
shanshin commented 2 months ago

Hi, unfortunately, Kover Gradle plugin is now designed so that it automatically runs all the test tasks present in the project.

Is the use of the Kover Aggregated Plugin suitable to you? It does not automatically run tasks.

shanshin commented 2 months ago

Not planned, the settings aggregated plug-in is expected to be used in the future