This repository has been archived by the owner on Jun 22, 2023. It is now read-only.
generated from navikt/helse-spokelse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
109 lines (92 loc) · 3.08 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
100
101
102
103
104
105
106
107
108
109
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
val slf4jVersion = "1.7.25"
val ktorVersion = "1.2.4"
val jaxwsVersion = "2.3.1"
val cxfVersion = "3.3.5"
val jacksonVersion = "2.9.8"
val kafkaVersion = "2.3.1"
val prometheusVersion = "0.6.0"
val micrometerRegistryPrometheusVersion = "1.1.5"
val wireMockVersion = "2.19.0"
val mockkVersion = "1.9.3.kotlin12"
val junitJupiterVersion = "5.4.0"
val mainClass = "no.nav.helse.spoof.AppKt"
plugins {
kotlin("jvm") version "1.3.70"
}
buildscript {
dependencies {
classpath("org.junit.platform:junit-platform-gradle-plugin:1.2.0")
}
}
dependencies {
implementation("no.nav.helse:rapids-rivers:1.40300fd")
implementation("io.ktor:ktor-client-cio:$ktorVersion")
implementation("io.ktor:ktor-client-jackson:$ktorVersion")
implementation("javax.activation:activation:1.1.1")
implementation("javax.xml.ws:jaxws-api:$jaxwsVersion")
implementation("com.sun.xml.ws:jaxws-ri:2.3.2-1")
implementation("org.apache.cxf:cxf-rt-transports-http-jetty:$cxfVersion")
implementation("org.apache.cxf:cxf-rt-frontend-jaxws:$cxfVersion")
implementation("org.apache.cxf:cxf-rt-transports-http:$cxfVersion")
implementation("org.apache.cxf:cxf-rt-features-logging:$cxfVersion")
testImplementation("io.mockk:mockk:$mockkVersion")
testImplementation("com.github.tomakehurst:wiremock:$wireMockVersion") {
exclude(group = "junit")
}
testImplementation("no.nav:kafka-embedded-env:2.3.0")
testImplementation("org.awaitility:awaitility:4.0.1")
testImplementation("org.junit.jupiter:junit-jupiter-api:$junitJupiterVersion")
testImplementation("org.junit.jupiter:junit-jupiter-params:$junitJupiterVersion")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$junitJupiterVersion")
}
val githubUser: String by project
val githubPassword: String by project
repositories {
jcenter()
mavenCentral()
maven("https://dl.bintray.com/kotlin/ktor")
maven("http://packages.confluent.io/maven/")
maven {
url = uri("https://maven.pkg.github.com/navikt/helse-spleis")
credentials {
username = githubUser
password = githubPassword
}
}
}
java {
sourceCompatibility = JavaVersion.VERSION_12
targetCompatibility = JavaVersion.VERSION_12
}
tasks.named<Jar>("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)
}
}
}
tasks.named<KotlinCompile>("compileKotlin") {
kotlinOptions.jvmTarget = "12"
}
tasks.named<KotlinCompile>("compileTestKotlin") {
kotlinOptions.jvmTarget = "12"
}
tasks.withType<Test> {
useJUnitPlatform()
testLogging {
events("passed", "skipped", "failed")
}
}
tasks.withType<Wrapper> {
gradleVersion = "5.6.2"
}