summaryrefslogtreecommitdiff
path: root/gradle/kover.gradle
blob: 31b03ebaf395d871ad10b9e799c95f8304f06638 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*
 * Copyright 2017-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
 */

apply plugin: 'kover'

tasks.withType(Test) { task ->
    kover {
        enabled = rootProject.ext.koverEnabled

    }
}
tasks.koverVerify {
    // Core is mainly uncovered because a lot of serializers are tested with JSON
    def minPercentage = (project.name.contains("core") || project.name.contains("properties")|| project.name.contains("json-okio")) ? 44 : 80
    rule {
        name = "Minimal line coverage rate in percents"
        bound {
            minValue = minPercentage
            // valueType is 'COVERED_LINES_PERCENTAGE' by default
        }
    }
}