forked from navikt/rapids-and-rivers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
120 lines (96 loc) · 3.41 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
val jvmTarget = "17"
val ktorVersion = "2.3.3"
val kafkaVersion = "3.5.1"
val micrometerRegistryPrometheusVersion = "1.11.3"
val junitJupiterVersion = "5.10.0"
val jacksonVersion = "2.15.2"
val logbackClassicVersion = "1.4.11"
val logbackEncoderVersion = "7.4"
val awaitilityVersion = "4.2.0"
val kafkaTestcontainerVersion = "1.19.0"
group = "com.github.navikt"
version = properties["version"] ?: "local-build"
plugins {
kotlin("jvm") version "1.9.0"
id("java")
id("maven-publish")
}
dependencies {
api("ch.qos.logback:logback-classic:$logbackClassicVersion")
api("net.logstash.logback:logstash-logback-encoder:$logbackEncoderVersion")
api("io.ktor:ktor-server-cio:$ktorVersion")
api("org.apache.kafka:kafka-clients:$kafkaVersion")
api("com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonVersion")
api("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jacksonVersion")
api("io.ktor:ktor-server-metrics-micrometer:$ktorVersion")
api("io.micrometer:micrometer-registry-prometheus:$micrometerRegistryPrometheusVersion")
testImplementation("org.junit.jupiter:junit-jupiter-api:$junitJupiterVersion")
testImplementation("org.junit.jupiter:junit-jupiter-params:$junitJupiterVersion")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$junitJupiterVersion")
testImplementation("org.testcontainers:kafka:$kafkaTestcontainerVersion")
testImplementation("org.awaitility:awaitility:$awaitilityVersion")
}
java {
sourceCompatibility = JavaVersion.toVersion(jvmTarget)
targetCompatibility = JavaVersion.toVersion(jvmTarget)
withSourcesJar()
}
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = jvmTarget
}
tasks.named<KotlinCompile>("compileTestKotlin") {
kotlinOptions.jvmTarget = jvmTarget
}
tasks.withType<Test> {
useJUnitPlatform()
testLogging {
events("skipped", "failed")
showExceptions = true
showStackTraces = true
showCauses = true
exceptionFormat = TestExceptionFormat.FULL
showStandardStreams = true
}
}
tasks.withType<Wrapper> {
gradleVersion = "8.1.1"
}
repositories {
mavenCentral()
}
val githubUser: String? by project
val githubPassword: String? by project
publishing {
repositories {
maven {
url = uri("https://maven.pkg.github.com/navikt/rapids-and-rivers")
credentials {
username = githubUser
password = githubPassword
}
}
}
publications {
create<MavenPublication>("mavenJava") {
pom {
name.set("rapids-rivers")
description.set("Rapids and Rivers")
url.set("https://github.com/navikt/rapids-and-rivers")
licenses {
license {
name.set("MIT License")
url.set("https://opensource.org/licenses/MIT")
}
}
scm {
connection.set("scm:git:https://github.com/navikt/rapids-and-rivers.git")
developerConnection.set("scm:git:https://github.com/navikt/rapids-and-rivers.git")
url.set("https://github.com/navikt/rapids-and-rivers")
}
}
from(components["java"])
}
}
}