Kotlin / kotlinx-kover

Apache License 2.0
1.25k stars 46 forks source link

What is the meaning of the `koverGenerateArtifact` task? #558

Closed roeniss closed 1 month ago

roeniss commented 2 months ago

Describe what you would like to clarify about Kover

Hi. I've found that kover plugin adds some tasks to original check task:

./gradlew check --dry-run

:ktfmtCheckMain SKIPPED
:ktfmtCheckTest SKIPPED
:checkKotlinGradlePluginConfigurationErrors SKIPPED
:compileKotlin SKIPPED
:compileJava SKIPPED
:processResources SKIPPED
:classes SKIPPED
:compileTestKotlin SKIPPED
:compileTestJava SKIPPED
:koverFindJar SKIPPED         <<
:processTestResources SKIPPED
:testClasses SKIPPED
:test SKIPPED
:koverGenerateArtifact SKIPPED         <<
:koverVerify SKIPPED         <<
:check SKIPPED

BUILD SUCCESSFUL in 445ms

But I couldn't find the related code or documentation. What is the actual action/purpose of that?

shanshin commented 2 months ago

Hi, for Kotlin JVM projects by default Kover validate verification rules on running check task (koverVerify task). koverGenerateArtifact and koverFindJar are internal Kover tasks, they should not be called explicitly and are details of the implementation of a specific version of the plugin. Their names, the logic of their work and the actions performed may vary depending on the version.

For this version of the plugin, koverFindJar performs a resolve of JVM instrumentation agent, koverGenerateArtifact collect important information about current project required for generating reports (source and output directories, test tasks) and write it to appropriate file - Gradle artifact.

roeniss commented 1 month ago

I understood. thank you!