blob: 9fd8a3ca3ad135b02cf874baf3ce8f7342e457db [file] [log] [blame]
Leonid Startseve721ebe2021-10-29 14:41:49 +03001/*
2 * Copyright 2017-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
3 */
4
5apply plugin: 'kover'
6
7tasks.withType(Test) { task ->
8 // Core is mainly uncovered because a lot of serializers are tested with JSON
9 def minPercentage = (project.name.contains("core") || project.name.contains("properties")) ? 50 : 80
10 kover {
11 enabled = rootProject.ext.koverEnabled
12 generateXml = false
13 generateHtml = true
14 htmlReportDir.set(file("${rootProject.buildDir}/kover/${project.name}/html"))
15 verificationRule {
16 name = "Minimal line coverage rate in percents"
17 minValue = minPercentage
18 // valueType is 'COVERED_LINES_PERCENTAGE' by default
19 }
20 }
21}