blob: 31b03ebaf395d871ad10b9e799c95f8304f06638 [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 ->
Leonid Startseve721ebe2021-10-29 14:41:49 +03008 kover {
9 enabled = rootProject.ext.koverEnabled
Vsevolod Tolstopyatov51ccccf2021-11-22 19:50:18 +030010
11 }
12}
13tasks.koverVerify {
14 // Core is mainly uncovered because a lot of serializers are tested with JSON
Clara Fok93e18122024-04-23 10:28:10 -070015 def minPercentage = (project.name.contains("core") || project.name.contains("properties")|| project.name.contains("json-okio")) ? 44 : 80
Vsevolod Tolstopyatov51ccccf2021-11-22 19:50:18 +030016 rule {
17 name = "Minimal line coverage rate in percents"
18 bound {
Leonid Startseve721ebe2021-10-29 14:41:49 +030019 minValue = minPercentage
20 // valueType is 'COVERED_LINES_PERCENTAGE' by default
21 }
22 }
23}