forked from navikt/helse-sporbar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
99 lines (81 loc) · 3.04 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.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
val mainClass = "no.nav.helse.sporbar.AppKt"
val jvmTarget = "17"
val rapidsAndRiversVersion = "2022111011111668075098.65e508dcde8b"
val ktorVersion = "2.1.3"
val junitJupiterVersion = "5.9.0"
val testcontainersVersion = "1.17.4"
val mockkVersion = "1.13.2"
val kotliqueryVersion = "1.9.0"
val hikariCPVersion = "5.0.1"
val vaultjdbcVersion = "1.3.10"
val flywaycoreVersion = "9.8.1"
val jsonSchemaValidatorVersion = "1.0.73"
val jsonassertVersion = "1.5.1"
plugins {
kotlin("jvm") version "1.7.21"
}
dependencies {
implementation("com.github.navikt:rapids-and-rivers:$rapidsAndRiversVersion")
implementation("io.ktor:ktor-client-apache:$ktorVersion")
implementation("io.ktor:ktor-client-content-negotiation:$ktorVersion")
implementation("io.ktor:ktor-serialization-jackson:$ktorVersion")
implementation("io.ktor:ktor-server-content-negotiation:$ktorVersion")
implementation("io.ktor:ktor-serialization-jackson:$ktorVersion")
implementation("io.ktor:ktor-server-auth-jwt:$ktorVersion") {
exclude(group = "junit")
}
implementation("com.zaxxer:HikariCP:$hikariCPVersion")
implementation("no.nav:vault-jdbc:$vaultjdbcVersion")
implementation("org.flywaydb:flyway-core:$flywaycoreVersion")
implementation("com.github.seratch:kotliquery:$kotliqueryVersion")
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:postgresql:$testcontainersVersion")
testImplementation("io.mockk:mockk:$mockkVersion")
testImplementation("com.networknt:json-schema-validator:$jsonSchemaValidatorVersion")
testImplementation("org.skyscreamer:jsonassert:$jsonassertVersion")
}
repositories {
maven("https://jitpack.io")
mavenCentral()
}
tasks {
named<KotlinCompile>("compileKotlin") {
kotlinOptions.jvmTarget = jvmTarget
}
named<KotlinCompile>("compileTestKotlin") {
kotlinOptions.jvmTarget = jvmTarget
}
withType<Wrapper> {
gradleVersion = "7.4.2"
}
withType<Test> {
useJUnitPlatform()
testLogging {
events("skipped", "failed")
exceptionFormat = FULL
showExceptions = true
showCauses = true
showStackTraces = true
}
}
withType<Jar> {
archiveBaseName.set("app")
manifest {
attributes["Main-Class"] = mainClass
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)
}
}
}
}