This repository has been archived by the owner on Jan 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
122 lines (101 loc) · 4.35 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
110
111
112
113
114
115
116
117
118
119
120
121
122
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
val dusseldorfKtorVersion = "3.2.1.2-ba1edd2"
val k9RapidVersion = "1.20221007103720-75312fe"
val ktorVersion = ext.get("ktorVersion").toString()
val slf4jVersion = ext.get("slf4jVersion").toString()
val kotlinxCoroutinesVersion = ext.get("kotlinxCoroutinesVersion").toString()
val openhtmltopdfVersion = "1.0.10"
val kafkaEmbeddedEnvVersion = ext.get("kafkaEmbeddedEnvVersion").toString()
val kafkaVersion = ext.get("kafkaVersion").toString() // Alligned med version fra kafka-embedded-env
val handlebarsVersion = "4.3.1"
val fuelVersion = "2.3.1"
val jsonassertVersion = "1.5.1"
val mainClass = "no.nav.helse.OmsorgsdagerMeldingProsesseringKt"
plugins {
kotlin("jvm") version "1.7.20"
id("com.github.johnrengelman.shadow") version "7.1.2"
}
buildscript {
// Henter ut diverse dependency versjoner, i.e. ktorVersion.
apply("https://raw.githubusercontent.com/navikt/dusseldorf-ktor/ba1edd2b4eb506d3d94432414ca68e4336f5db15/gradle/dusseldorf-ktor.gradle.kts")
}
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")
}
implementation ( "org.jetbrains.kotlinx:kotlinx-coroutines-slf4j:$kotlinxCoroutinesVersion")
// Client
implementation ( "no.nav.helse:dusseldorf-ktor-client:$dusseldorfKtorVersion")
implementation ( "no.nav.helse:dusseldorf-oauth2-client:$dusseldorfKtorVersion")
// PDF
implementation ( "com.openhtmltopdf:openhtmltopdf-pdfbox:$openhtmltopdfVersion")
implementation ( "com.openhtmltopdf:openhtmltopdf-slf4j:$openhtmltopdfVersion")
implementation ( "org.slf4j:jcl-over-slf4j:$slf4jVersion")
implementation ( "com.github.jknack:handlebars:$handlebarsVersion")
// Kafka
implementation("org.apache.kafka:kafka-streams:$kafkaVersion")
implementation(kotlin("stdlib-jdk8"))
//K9-Rapid
implementation("no.nav.k9.rapid:behov:$k9RapidVersion")
implementation("no.nav.k9.rapid:overfore-omsorgsdager:$k9RapidVersion")
implementation("no.nav.k9.rapid:fordele-omsorgsdager:$k9RapidVersion")
implementation("no.nav.k9.rapid:overfore-korona-omsorgsdager:$k9RapidVersion")
// Test
testImplementation ( "org.apache.kafka:kafka-clients:$kafkaVersion")
testImplementation ( "no.nav:kafka-embedded-env:$kafkaEmbeddedEnvVersion") {
exclude("org.glassfish", "jakarta.el")
exclude("org.apache.kafka", "kafka-clients")
exclude("javax.el", "javax.el-api")
}
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:$jsonassertVersion")
testImplementation("org.jetbrains.kotlin:kotlin-test-junit5")
}
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/navikt/k9-format")
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/")
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "17"
}
tasks.withType<ShadowJar> {
archiveBaseName.set("app")
archiveClassifier.set("")
manifest {
attributes(
mapOf(
"Main-Class" to mainClass
)
)
}
}
tasks.withType<Wrapper> {
gradleVersion = "7.5.1"
}
tasks.withType<Test> {
useJUnitPlatform()
}