-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
87 lines (75 loc) · 2.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
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
77
78
79
80
81
82
83
84
85
86
87
import com.vanniktech.maven.publish.SonatypeHost.Companion.S01
val ktorVersion: String by project
val kotestVersion: String by project
plugins {
kotlin("jvm") version "2.1.0"
id("org.jetbrains.kotlin.plugin.serialization") version "2.1.0"
id("jacoco")
id("com.vanniktech.maven.publish") version "0.30.0"
}
group = "io.github.schwarzit"
version = "1.1.0"
repositories {
mavenCentral()
}
dependencies {
implementation(kotlin("reflect"))
implementation("io.ktor:ktor-server-core:$ktorVersion")
implementation("io.ktor:ktor-serialization-kotlinx-json:$ktorVersion")
testImplementation(kotlin("test"))
testImplementation("io.kotest:kotest-runner-junit5:$kotestVersion")
testImplementation("io.kotest:kotest-assertions-core:$kotestVersion")
}
tasks.test {
useJUnitPlatform()
}
kotlin {
jvmToolchain(21)
}
mavenPublishing {
publishToMavenCentral(S01)
coordinates(group.toString(), "kotlin-rfc9457-problem-details", version.toString())
pom {
name.set("Kotlin-RFC9457-Problem-Details")
description.set("A Kotlin implementation of the RFC 9457 problem details format for handling HTTP API errors.")
inceptionYear.set("2024")
url.set("https://github.com/SchwarzIT/kotlin-rfc9457-problem-details")
licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
distribution.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
developers {
developer {
name.set("Johannes Hepp")
url.set("https://github.com/johanneshepp")
}
}
scm {
url.set("https://github.com/SchwarzIT/kotlin-rfc9457-problem-details")
connection.set("scm:git:git://github.com/SchwarzIT/kotlin-rfc9457-problem-details.git")
developerConnection.set("scm:git:ssh://git@github.com/SchwarzIT/kotlin-rfc9457-problem-details.git")
}
}
}
jacoco {
reportsDirectory.set(layout.buildDirectory.dir("reports/jacoco/"))
}
with(tasks) {
test {
useJUnitPlatform()
finalizedBy(jacocoTestReport)
}
jacocoTestReport {
dependsOn(test)
reports {
xml.required.set(true)
csv.required.set(false)
html.required.set(true)
xml.outputLocation.set(layout.buildDirectory.file("reports/jacoco/report.xml"))
html.outputLocation.set(layout.buildDirectory.dir("reports/jacoco/html"))
}
}
}