This repository has been archived by the owner on Feb 22, 2023. It is now read-only.
generated from navikt/helse-spenn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
99 lines (83 loc) · 3.25 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
import org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
val kafkaVersion = "2.4.0"
val junitJupiterVersion = "5.7.0"
val jacksonVersion = "2.11.3"
val testcontainersVersion = "1.16.2"
plugins {
kotlin("jvm") version "1.4.10"
}
repositories {
mavenCentral()
maven("https://jitpack.io")
maven("https://packages.confluent.io/maven/")
}
dependencies {
api(kotlin("stdlib-jdk8"))
api("org.apache.kafka:kafka-clients:$kafkaVersion")
implementation("org.jetbrains.kotlin:kotlin-reflect:1.4.10")
implementation("org.flywaydb:flyway-core:7.0.4")
implementation("com.zaxxer:HikariCP:3.4.5")
implementation("no.nav:vault-jdbc:1.3.7")
implementation("org.postgresql:postgresql:42.2.13")
implementation("com.github.seratch:kotliquery:1.3.1")
implementation("ch.qos.logback:logback-classic:1.2.3")
implementation("net.logstash.logback:logstash-logback-encoder:6.4") {
exclude("com.fasterxml.jackson.core")
exclude("com.fasterxml.jackson.dataformat")
}
implementation("com.fasterxml.jackson.core:jackson-core:$jacksonVersion")
implementation("com.fasterxml.jackson.core:jackson-databind:$jacksonVersion")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonVersion")
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jacksonVersion")
testImplementation("no.nav:kafka-embedded-env:2.5.0")
constraints {
testImplementation("org.apache.kafka:kafka_2.12:2.6.0")
testImplementation("org.glassfish.jersey.core:jersey-server:2.31")
}
testImplementation("com.opentable.components:otj-pg-embedded:0.13.3")
testImplementation("io.mockk:mockk:1.10.2")
testImplementation("org.junit.jupiter:junit-jupiter-api:$junitJupiterVersion")
testImplementation("org.junit.jupiter:junit-jupiter-params:$junitJupiterVersion")
testRuntimeOnly("org.junit.platform:junit-platform-launcher:1.7.0")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$junitJupiterVersion")
testImplementation("org.testcontainers:postgresql:$testcontainersVersion")
testImplementation("org.testcontainers:testcontainers:$testcontainersVersion")
testImplementation("org.testcontainers:junit-jupiter:$testcontainersVersion")
}
tasks {
compileKotlin {
kotlinOptions.jvmTarget = "14"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "14"
}
named<Jar>("jar") {
archiveFileName.set("app.jar")
manifest {
attributes["Main-Class"] = "no.nav.helse.sparker.ApplicationKt"
attributes["Class-Path"] = configurations.runtimeClasspath.get().joinToString(separator = " ") {
it.name
}
}
doLast {
configurations.runtimeClasspath.get().forEach {
val file = File("$buildDir/libs/${it.name}")
if (!file.exists())
it.copyTo(file)
}
}
}
withType<Test> {
useJUnitPlatform()
testLogging {
events("passed", "skipped", "failed")
showCauses = true
showExceptions = true
exceptionFormat = FULL
showStackTraces = true
}
}
withType<Wrapper> {
gradleVersion = "6.7"
}
}