-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle.kts
62 lines (53 loc) · 1.31 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
58
59
60
61
62
import io.gitlab.arturbosch.detekt.*
/*
* Copyright 2020-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
* Copyright 2021 hfhbd and contributors. Use of this source code is governed by the Apache 2.0 license.
*/
plugins {
id("org.jetbrains.kotlinx.binary-compatibility-validator")
id("org.jetbrains.dokka")
id("io.gitlab.arturbosch.detekt")
}
dependencies {
for (sub in subprojects) {
dokka(sub)
}
}
dokka {
dokkaPublications.configureEach {
includes.from("README.md")
}
}
detekt {
source.from(files(rootProject.rootDir))
parallel = true
autoCorrect = true
buildUponDefaultConfig = true
}
dependencies {
detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:${detekt.toolVersion}")
}
tasks {
fun SourceTask.config() {
include("**/*.kt")
exclude("**/*.kts")
exclude("**/resources/**")
exclude("**/generated/**")
exclude("**/build/**")
}
withType<DetektCreateBaselineTask>().configureEach {
config()
}
withType<Detekt>().configureEach {
config()
reports {
sarif.required.set(true)
}
}
}
apiValidation {
@OptIn(kotlinx.validation.ExperimentalBCVApi::class)
klib {
enabled = true
}
}