-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
73 lines (63 loc) · 1.93 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
63
64
65
66
67
68
69
70
71
72
73
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
alias(libs.plugins.kotlin.jvm) apply false
alias(libs.plugins.pitest) apply false
alias(libs.plugins.spotless) apply true
}
allprojects {
apply(plugin = "com.diffplug.spotless")
repositories {
mavenCentral()
}
afterEvaluate {
plugins.withId("com.diffplug.spotless") {
configure<com.diffplug.gradle.spotless.SpotlessExtension> {
kotlin {
ktlint()
trimTrailingWhitespace()
target("src/**/*.kt")
}
kotlinGradle {
ktlint()
trimTrailingWhitespace()
target("**/*.kts")
}
flexmark {
flexmark()
trimTrailingWhitespace()
target("**/*.md")
}
}
}
}
}
subprojects {
group = "com.xkcddatahub"
version = "0.0.1"
apply(plugin = "info.solidsoft.pitest")
afterEvaluate {
plugins.withId("info.solidsoft.pitest") {
configure<info.solidsoft.gradle.pitest.PitestPluginExtension> {
targetClasses.set(listOf("com.xkcddatahub.*"))
threads.set(Runtime.getRuntime().availableProcessors())
outputFormats.set(listOf("XML", "HTML"))
junit5PluginVersion = "1.2.1"
timestampedReports.set(false)
excludedClasses =
listOf(
"com.xkcddatahub.*.di.*",
)
}
}
tasks.withType(Test::class) {
useJUnitPlatform()
}
tasks.withType(KotlinCompile::class.java) {
dependsOn("spotlessCheck", ":copyGitHooks")
}
}
}
tasks.register("copyGitHooks", Copy::class) {
from(".github/githooks")
into(".git/hooks")
}