Kover - Gradle plugin for Kotlin code coverage tools: Kover and JaCoCo.
Minimum supported version of Gradle
is 6.8
.
For more information, please refer to the documentation of the latest release
- Collection of code coverage through
JVM
test tasks. HTML
andXML
reports.- Support for
Kotlin/JVM
,Kotlin Multiplatform
and mixedKotlin-Java
sources with zero additional configuration. - Support for
Kotlin Android
without the need to divide it into build types and flavours. - Verification rules with bounds to keep track of coverage.
- Customizable filters for instrumented classes.
The recommended way of applying Kover is with the plugins DSL.
Add the following to your top-level build file:
Kotlin
plugins {
id("org.jetbrains.kotlinx.kover") version "0.6.1"
}
Groovy
plugins {
id 'org.jetbrains.kotlinx.kover' version '0.6.1'
}
Legacy method of applying plugins can be used if you cannot use the plugins DSL for some reason.
Kotlin
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("org.jetbrains.kotlinx:kover:0.6.1")
}
}
apply(plugin = "kover")
Groovy
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'org.jetbrains.kotlinx:kover:0.6.1'
}
}
apply plugin: 'kover'