generated from navikt/helse-spokelse
-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle.kts
94 lines (81 loc) · 3.59 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
val mainClass = "no.nav.helse.sporbar.AppKt"
val rapidsAndRiversVersion = "2024112511071732529266.253c42b70448"
val tbdLibsVersion = "2024.11.25-10.59-6f263a10"
val ktorVersion = "3.0.1"
val junitJupiterVersion = "5.11.3"
val mockkVersion = "1.13.13"
val jsonSchemaValidatorVersion = "1.0.73"
val jsonassertVersion = "1.5.1"
plugins {
kotlin("jvm") version "2.0.21"
}
dependencies {
implementation("com.github.navikt:rapids-and-rivers:$rapidsAndRiversVersion")
implementation("com.github.navikt.tbd-libs:azure-token-client-default:$tbdLibsVersion")
implementation("com.github.navikt.tbd-libs:retry:$tbdLibsVersion")
implementation("com.github.navikt.tbd-libs:speed-client:$tbdLibsVersion")
implementation("com.github.navikt.tbd-libs:spedisjon-client:$tbdLibsVersion")
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")
}
testImplementation("com.github.navikt.tbd-libs:rapids-and-rivers-test:$tbdLibsVersion")
testImplementation("io.mockk:mockk:$mockkVersion")
testImplementation("com.networknt:json-schema-validator:$jsonSchemaValidatorVersion")
testImplementation("org.skyscreamer:jsonassert:$jsonassertVersion")
testImplementation("org.junit.jupiter:junit-jupiter:$junitJupiterVersion")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
repositories {
val githubPassword: String? by project
mavenCentral()
/* ihht. https://github.com/navikt/utvikling/blob/main/docs/teknisk/Konsumere%20biblioteker%20fra%20Github%20Package%20Registry.md
så plasseres github-maven-repo (med autentisering) før nav-mirror slik at github actions kan anvende førstnevnte.
Det er fordi nav-mirroret kjører i Google Cloud og da ville man ellers fått unødvendige utgifter til datatrafikk mellom Google Cloud og GitHub
*/
maven {
url = uri("https://maven.pkg.github.com/navikt/maven-release")
credentials {
username = "x-access-token"
password = githubPassword
}
}
maven("https://github-package-registry-mirror.gc.nav.no/cached/maven-release")
}
kotlin {
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of("21"))
}
}
tasks {
withType<Test> {
useJUnitPlatform()
testLogging {
events("skipped", "failed")
}
val parallellDisabled = System.getenv("CI" ) == "true"
systemProperty("junit.jupiter.execution.parallel.enabled", parallellDisabled.not().toString())
systemProperty("junit.jupiter.execution.parallel.mode.default", "concurrent")
systemProperty("junit.jupiter.execution.parallel.config.strategy", "fixed")
systemProperty("junit.jupiter.execution.parallel.config.fixed.parallelism", "8")
}
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("${layout.buildDirectory.get()}/libs/${it.name}")
if (!file.exists()) it.copyTo(file)
}
}
}
}