This repository has been archived by the owner on May 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
76 lines (60 loc) · 1.8 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
74
75
76
import com.diffplug.gradle.spotless.SpotlessExtension
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import java.io.ByteArrayOutputStream
plugins {
kotlin("jvm") version "1.7.10"
`java-library`
id("com.diffplug.spotless").version("6.11.0")
jacoco
}
group = "de.rki.jfn"
val versionMajor: String by project
val versionMinor: String by project
val versionPatch: String by project
val versionBuild: String by project
version = "$versionMajor.$versionMinor.$versionPatch-rc.$versionBuild"
repositories {
mavenCentral()
}
dependencies {
implementation(kotlin("stdlib"))
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4")
// Jackson
implementation("com.fasterxml.jackson.core:jackson-core:2.13.4")
implementation("com.fasterxml.jackson.core:jackson-annotations:2.13.4")
implementation("com.fasterxml.jackson.core:jackson-databind:2.13.4")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.13.4")
testImplementation(kotlin("test"))
testImplementation("io.kotest:kotest-assertions-core:5.4.2")
// jUnit5
testImplementation("org.junit.jupiter:junit-jupiter-params:5.9.0")
}
jacoco {
toolVersion = "0.8.7"
}
tasks.withType<KotlinCompile>().configureEach {
kotlinOptions {
jvmTarget = "11"
}
}
tasks.test {
useJUnitPlatform()
finalizedBy(tasks.jacocoTestReport) // Report is always generated after tests run
}
tasks.jacocoTestReport {
dependsOn(tasks.test) // Tests are required to run before generating the report
reports {
xml.required.set(true)
html.required.set(true)
}
}
java {
withSourcesJar()
}
configure<SpotlessExtension> {
kotlin {
target("**/*.kt")
targetExclude("$buildDir/**/*.kt", "**/*.gradle.kts")
ktlint("0.47.1")
}
}