This repository has been archived by the owner on Aug 26, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
93 lines (74 loc) · 2.91 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
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
val mainClass = "no.nav.helse.K9EttersendingMottakKt"
val dusseldorfKtorVersion = "2.1.6.0-1516d10"
val ktorVersion = ext.get("ktorVersion").toString()
val kafkaEmbeddedEnvVersion = ext.get("kafkaEmbeddedEnvVersion").toString()
val kafkaVersion = ext.get("kafkaVersion").toString() // Alligned med version fra kafka-embedded-env
val fuelVersion = "2.3.1"
plugins {
kotlin("jvm") version "1.5.21"
id("com.github.johnrengelman.shadow") version "7.0.0"
}
buildscript {
apply("https://raw.githubusercontent.com/navikt/dusseldorf-ktor/1516d1006074d9459dbeaa4b355f619ee04a4b77/gradle/dusseldorf-ktor.gradle.kts")
}
repositories {
mavenLocal()
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/navikt/dusseldorf-ktor")
credentials {
username = project.findProperty("gpr.user") as String? ?: System.getenv("GITHUB_USERNAME")
password = project.findProperty("gpr.key") as String? ?: System.getenv("GITHUB_TOKEN")
}
}
mavenCentral()
maven("https://jitpack.io")
maven("https://packages.confluent.io/maven/")
}
dependencies {
// Server
implementation("no.nav.helse:dusseldorf-ktor-core:$dusseldorfKtorVersion")
implementation("no.nav.helse:dusseldorf-ktor-jackson:$dusseldorfKtorVersion")
implementation("no.nav.helse:dusseldorf-ktor-metrics:$dusseldorfKtorVersion")
implementation("no.nav.helse:dusseldorf-ktor-health:$dusseldorfKtorVersion")
implementation("no.nav.helse:dusseldorf-ktor-auth:$dusseldorfKtorVersion")
implementation("com.github.kittinunf.fuel:fuel:$fuelVersion")
implementation("com.github.kittinunf.fuel:fuel-coroutines:$fuelVersion"){
exclude(group = "org.jetbrains.kotlinx", module = "kotlinx-coroutines-core")
}
// Client
implementation("no.nav.helse:dusseldorf-ktor-client:$dusseldorfKtorVersion")
implementation("no.nav.helse:dusseldorf-oauth2-client:$dusseldorfKtorVersion")
// Kafka
implementation("org.apache.kafka:kafka-clients:$kafkaVersion")
// Test
testImplementation("no.nav:kafka-embedded-env:$kafkaEmbeddedEnvVersion")
testImplementation("no.nav.helse:dusseldorf-test-support:$dusseldorfKtorVersion")
testImplementation("io.ktor:ktor-server-test-host:$ktorVersion") {
exclude(group = "org.eclipse.jetty")
}
testImplementation("org.skyscreamer:jsonassert:1.5.0")
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "11"
}
tasks.withType<ShadowJar> {
archiveBaseName.set("app")
archiveClassifier.set("")
manifest {
attributes(
mapOf(
"Main-Class" to mainClass
)
)
}
}
tasks.withType<Wrapper> {
gradleVersion = "7.0.1"
}