-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle.kts
48 lines (43 loc) · 1.45 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
import io.gitlab.arturbosch.detekt.DetektPlugin
import io.gitlab.arturbosch.detekt.extensions.DetektExtension
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm").version(Versions.Plugins.KOTLIN).apply(false)
kotlin("plugin.serialization").version(Versions.Plugins.KOTLIN).apply(false)
id("org.liquibase.gradle").version(Versions.Plugins.LIQUIBASE).apply(false)
id("io.gitlab.arturbosch.detekt").version(Versions.Plugins.DETEKT).apply(false)
}
allprojects {
apply<DetektPlugin>()
apply<JacocoPlugin>()
configure<DetektExtension> {
parallel = true
config.from(files("$rootDir/detekt.yml"))
buildUponDefaultConfig = false
source.from(files(projectDir))
}
configure<JacocoPluginExtension> {
toolVersion = Versions.Plugins.JACOCO
}
tasks {
withType<KotlinCompile> {
kotlinOptions.jvmTarget = Versions.JVM
}
withType<Jar> {
// Workaround for https://stackoverflow.com/q/42174572/750510
archiveBaseName.set(rootProject.name + "-" + this.project.path.removePrefix(":").replace(":", "-"))
}
withType<Test> {
useJUnitPlatform()
testLogging {
showStandardStreams = true
}
}
withType<JacocoReport> {
reports {
xml.required.set(true)
html.required.set(true)
}
}
}
}