-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
78 lines (66 loc) · 2.02 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
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
kotlin("jvm")
kotlin("plugin.serialization")
id("org.jlleitschuh.gradle.ktlint")
id("maven-publish")
}
group = "no.nav.helsearbeidsgiver"
version = "0.1.9"
kotlin {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_17)
}
}
repositories {
mavenCentral()
mavenNav("*")
}
tasks.register("printVersion") {
println(project.version)
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
}
}
repositories {
mavenNav("hag-${rootProject.name}")
}
}
dependencies {
val kotlinxSerializationVersion: String by project
val ktorVersion: String by project
val utilsVersion: String by project
api("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3")
implementation("no.nav.helsearbeidsgiver:utils:$utilsVersion")
implementation("io.ktor:ktor-client-apache5:$ktorVersion")
implementation("io.ktor:ktor-client-content-negotiation:$ktorVersion")
implementation("io.ktor:ktor-client-core:$ktorVersion")
implementation("io.ktor:ktor-serialization-kotlinx-json:$ktorVersion")
implementation("com.nimbusds:nimbus-jose-jwt:9.40")
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.8.1")
testImplementation(testFixtures("no.nav.helsearbeidsgiver:utils:$utilsVersion"))
testImplementation("io.ktor:ktor-client-mock:$ktorVersion")
testImplementation("io.mockk:mockk:1.13.11")
testImplementation("org.junit.jupiter:junit-jupiter:5.9.2")
testImplementation(kotlin("test"))
testRuntimeOnly("org.slf4j:slf4j-simple:2.0.7")
}
tasks.test {
useJUnitPlatform()
}
kotlin {
jvmToolchain(17)
}
fun RepositoryHandler.mavenNav(repo: String): MavenArtifactRepository {
val githubPassword: String by project
return maven {
setUrl("https://maven.pkg.github.com/navikt/$repo")
credentials {
username = "x-access-token"
password = githubPassword
}
}
}