Kotlin/kotlinx-kover

Is it possible to generate both xml and html report in a single gradle task?

artyomefimov opened this issue · 4 comments

Hi, we use kover to generate reports on CI. Now we use generation only in xml format, but it would be great to generate both xml and html reports using the single gradle task.
As I know, currently the only option to generate both types of reports is to run two tasks: koverXmlReportVariantName and koverHtmlReportVariantName but it's rather expensive to run both of these tasks on each pipeline.

Is there a task that can generate both html and xml reports?

Kover version we use is 0.8.3

Thanks!

Hi,
the generation of an XML report and an HTML report is generated quickly enough if both commands are called at the same time, like this ./gradlew koverXmlReportVariantName koverHtmlReportVariantName

And combination of these two commands called at the same time will run unit tests twice? Or the reports generation will use the result of a single unit tests run?

And combination of these two commands called at the same time will run unit tests twice?

the tests will be run once, and the outputs of the run will be reused in both Kover tasks (refer to the docs to learn more about Gradle task graph and inputs/outputs).

There are no repetitions in the execution graph, so if two tasks depend on the same one, then it is executed only once.

Thank you!