Kotlin / kotlinx-kover

Apache License 2.0
1.36k stars 53 forks source link

with `onCheck.set(true)` merged tasks are not launched #213

Closed AleksDanil closed 2 years ago

AleksDanil commented 2 years ago

0.6.0-Beta

I configured simple multi module project and set onCheck.set(true) for verify, htmlReport, xmlReport inside koverMerged for parent module:

koverMerged {
    enable()

    xmlReport {
        onCheck.set(true)
    }

    htmlReport {
        onCheck.set(true)
    }

    verify {
        onCheck.set(true)
        ...
    }

}

None of koverMergedHtmlReport, koverMergedXmlReport, koverMergeVerify is launched when I run check task.

You can check attached project MultiModule.zip

shanshin commented 2 years ago

Not a bug, lack of documentation: onCheck applies only to the check task located in the same project where the merged tasks were created (koverMerged.enable() was called).

In this example, this is the root project. However, because the base plugin is not directly or transitively applied , then the check task does not exist in it and merged reports are not attached to anything.

This is easy to check by calling ./gradlew :check.