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

Replace JaCoCo ant-calls with programmatic calls of JaCoCo's classes

Open shanshin opened this issue 1 year ago • 0 comments

What is your use-case and why do you need this feature? At the moment, ant-calls from the org.jacoco.ant dependency are used to work with JaCoCo.

This is a less reliable way to use dependencies, because we can only check the correctness of the code in runtime, we have to use the AntBuilder mechanism that we cannot control, unwanted code is executed, and it is also difficult to add new functionality to an existing.

Describe the solution you'd like Changes:

  • calling the JaCoCo code inside Gradle workers with
  • using classes from org.jacoco.report to work with JaCoCo, e.g. RulesChecker for verification
  • analyze if its API changes for different versions of JaCoCo, then we will need to create your own module for each subsequent version with an individual dependency on the corresponding version of JaCoCo
  • suggestion: allow users to specify their own CoverageTool heirs so that their coverage tools can be implemented

Related issues, should be fixed by this changes: https://github.com/Kotlin/kotlinx-kover/issues/606, https://github.com/Kotlin/kotlinx-kover/issues/544

shanshin avatar Jun 10 '24 17:06 shanshin