forked from Kotlin/kotlinx-io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
57 lines (48 loc) · 1.35 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/*
* Copyright 2017-2023 JetBrains s.r.o. and respective authors and developers.
* Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
*/
import kotlinx.kover.gradle.plugin.dsl.MetricType
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.jetbrains.kotlin.gradle.tasks.KotlinNativeCompile
plugins {
id("kotlinx-io-publish") apply false
alias(libs.plugins.kover)
alias(libs.plugins.bcv)
alias(libs.plugins.dokka)
}
allprojects {
properties["DeployVersion"]?.let { version = it }
repositories {
mavenCentral()
}
}
subprojects {
tasks.withType<KotlinCompile>().configureEach {
kotlinOptions {
allWarningsAsErrors = true
freeCompilerArgs += "-Xjvm-default=all"
}
}
tasks.withType<KotlinNativeCompile>().configureEach {
kotlinOptions {
allWarningsAsErrors = true
}
}
}
apiValidation {
ignoredProjects.add("kotlinx-io-benchmarks")
}
dependencies {
kover(project(":kotlinx-io-core"))
kover(project(":kotlinx-io-bytestring"))
}
koverReport {
verify {
rule {
minBound(95, MetricType.LINE)
// we allow lower branch coverage, because not all checks in the internal code lead to errors
minBound(80, MetricType.BRANCH)
}
}
}