mill.kotlinlib.kover

Members list

Type members

Classlikes

@Scaladoc(value = "/**\n * Allows the aggregation of coverage reports across multi-module projects.\n *\n * Once tests have been run across all modules, this collects reports from\n * all modules that extend [[KoverModule]].\n *\n * - ./mill __.test # run tests for all modules\n * - ./mill mill.kotlinlib.kover/htmlReportAll # generates report in html format for all modules\n * - ./mill mill.kotlinlib.kover/xmlReportAll # generates report in xml format for all modules\n *\n * The aggregated report will be available at either `out/mill/kotlinlib/contrib/kover/Kover/htmlReportAll.dest/`\n * for html reports or `out/mill/kotlinlib/contrib/kover/Kover/xmlReportAll.dest/` for xml reports.\n */")
object Kover extends ExternalModule, KoverReportBaseModule

Allows the aggregation of coverage reports across multi-module projects.

Allows the aggregation of coverage reports across multi-module projects.

Once tests have been run across all modules, this collects reports from all modules that extend KoverModule.

  • ./mill __.test # run tests for all modules
  • ./mill mill.kotlinlib.kover/htmlReportAll # generates report in html format for all modules
  • ./mill mill.kotlinlib.kover/xmlReportAll # generates report in xml format for all modules

The aggregated report will be available at either out/mill/kotlinlib/contrib/kover/Kover/htmlReportAll.dest/ for html reports or out/mill/kotlinlib/contrib/kover/Kover/xmlReportAll.dest/ for xml reports.

Attributes

Supertypes
trait CoursierModule
class ExternalModule
class RootModule0
trait BaseModuleApi
trait Module
trait ModuleApi
trait Wrapper
class BaseClass
trait Cacher
trait Cacher
class Object
trait Matchable
class Any
Show all
Self type
Kover.type
@Scaladoc(value = "/**\n * Adds targets to a [[mill.kotlinlib.KotlinModule]] to create test coverage reports.\n *\n * This module allows you to generate code coverage reports for Kotlin projects with\n * [[https://github.com/Kotlin/kotlinx-kover Kover]].\n *\n * To declare a module for which you want to generate coverage reports you can\n * mix the [[KoverModule]] trait when defining your module. Additionally, you must define a submodule that extends the\n * [[KoverTests]] trait that belongs to your instance of [[KoverModule]].\n *\n * {{{\n * import mill.kotlinlib.KotlinModule\n * import mill.kotlinlib.kover.KoverModule\n *\n * object foo extends KotlinModule with KoverModule {\n * def kotlinVersion = \"2.0.20\"\n *\n * object test extends KotlinTests with KoverTests\n * }\n * }}}\n *\n * In addition to the normal tasks available to your Kotlin module, Kover\n * Module introduce a few new tasks and changes the behavior of an existing one.\n *\n * - ./mill foo.test # tests your project and collects metrics on code coverage\n * - ./mill foo.kover.htmlReport # uses the metrics collected by a previous test run to generate a coverage report in html format\n * - ./mill foo.kover.xmlReport # uses the metrics collected by a previous test run to generate a coverage report in xml format\n *\n * The measurement data by default is available at `out/foo/kover/koverDataDir.dest/`,\n * the html report is saved in `out/foo/kover/htmlReport.dest/`,\n * and the xml report is saved in `out/foo/kover/xmlReport.dest/`.\n */")
trait KoverModule extends KotlinModule

Adds targets to a mill.kotlinlib.KotlinModule to create test coverage reports.

Adds targets to a mill.kotlinlib.KotlinModule to create test coverage reports.

This module allows you to generate code coverage reports for Kotlin projects with Kover.

To declare a module for which you want to generate coverage reports you can mix the KoverModule trait when defining your module. Additionally, you must define a submodule that extends the KoverTests trait that belongs to your instance of KoverModule.

import mill.kotlinlib.KotlinModule
import mill.kotlinlib.kover.KoverModule

object foo extends KotlinModule with KoverModule {
 def kotlinVersion = "2.0.20"

 object test extends KotlinTests with KoverTests
}

In addition to the normal tasks available to your Kotlin module, Kover Module introduce a few new tasks and changes the behavior of an existing one.

  • ./mill foo.test # tests your project and collects metrics on code coverage
  • ./mill foo.kover.htmlReport # uses the metrics collected by a previous test run to generate a coverage report in html format
  • ./mill foo.kover.xmlReport # uses the metrics collected by a previous test run to generate a coverage report in xml format

The measurement data by default is available at out/foo/kover/koverDataDir.dest/, the html report is saved in out/foo/kover/htmlReport.dest/, and the xml report is saved in out/foo/kover/xmlReport.dest/.

Attributes

Supertypes
trait KotlinModule
trait JavaModule
trait JavaModuleApi
trait AssemblyModule
trait SemanticDbJavaModule
trait SemanticDbJavaModuleApi
trait OfflineSupportModule
trait GenIdeaModule
trait GenIdeaModuleApi
trait RunModule
trait RunModuleApi
trait DefaultTaskModule
trait JavaModuleBase
trait BspModule
trait BspModuleApi
trait WithJvmWorkerModule
trait JavaHomeModule
trait CoursierModule
trait Module
trait ModuleApi
trait Wrapper
class BaseClass
trait Cacher
trait Cacher
class Object
trait Matchable
class Any
Show all
Self type
trait KoverReportBaseModule extends CoursierModule

Attributes

Supertypes
trait CoursierModule
trait Module
trait ModuleApi
trait Wrapper
class BaseClass
trait Cacher
trait Cacher
class Object
trait Matchable
class Any
Show all
Known subtypes
object Kover
object kover
sealed trait ReportType

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Html
object Xml
object ReportType

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
ReportType.type

Value members

Inherited fields

val value: ExternalModule

Attributes

Inherited from:
Alias