-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
94 lines (76 loc) · 2.85 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
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.9.21"
kotlin("kapt") version "1.9.21"
id("com.github.ben-manes.versions") version "0.47.0"
id("java")
id("maven-publish")
}
subprojects {
apply {
plugin("org.jetbrains.kotlin.jvm")
plugin("org.jetbrains.kotlin.kapt")
plugin("java")
plugin("maven-publish")
}
val jvmTarget = "17"
val kafkaVersion = "3.7.1"
val micrometerRegistryPrometheusVersion = "1.13.1"
val junitJupiterVersion = "5.9.1"
val jacksonVersion = "2.14.1"
val logbackClassicVersion = "1.4.5"
val logbackEncoderVersion = "7.2"
val awaitilityVersion = "4.2.0"
val kafkaTestcontainerVersion = "1.19.6"
group = "com.github.navikt"
version = properties["version"] ?: "local-build"
dependencies {
api("ch.qos.logback:logback-classic:$logbackClassicVersion")
api("net.logstash.logback:logstash-logback-encoder:$logbackEncoderVersion")
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.micrometer:micrometer-core:$micrometerRegistryPrometheusVersion")
api("io.micrometer:micrometer-registry-prometheus:$micrometerRegistryPrometheusVersion")
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4")
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.awaitility:awaitility:$awaitilityVersion")
testImplementation("org.testcontainers:kafka:$kafkaTestcontainerVersion")
}
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.5"
}
repositories {
mavenLocal()
mavenCentral()
maven("https://packages.confluent.io/maven/")
}
}
repositories {
mavenCentral()
}