forked from navikt/skeleton-app-sommerstudenter2021
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
73 lines (58 loc) · 1.69 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
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.5.10"
id("com.github.johnrengelman.shadow") version "7.0.0"
}
val ktor_version = "1.6.0"
val junit_version = "5.6.0"
group = "no.nav"
repositories {
mavenCentral()
}
java {
sourceCompatibility = JavaVersion.VERSION_15
targetCompatibility = JavaVersion.VERSION_15
}
dependencies {
// Server
implementation("io.ktor:ktor-server-core:$ktor_version")
implementation("io.ktor:ktor-server-jetty:$ktor_version")
implementation("org.apache.kafka:kafka-clients:2.7.0")
// Logging
implementation("ch.qos.logback:logback-classic:1.2.3")
implementation("net.logstash.logback:logstash-logback-encoder:5.1")
implementation("org.slf4j:slf4j-api:1.7.25")
// Test
testImplementation("org.junit.jupiter:junit-jupiter-api:$junit_version")
testImplementation("io.ktor:ktor-server-tests:$ktor_version")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$junit_version")
}
tasks {
withType<KotlinCompile> {
kotlinOptions.jvmTarget = "15"
}
named<KotlinCompile>("compileTestKotlin") {
kotlinOptions.jvmTarget = "15"
}
withType<Test> {
useJUnitPlatform()
testLogging {
events("passed", "skipped", "failed")
}
}
withType<ShadowJar> {
archiveBaseName.set("app")
archiveClassifier.set("")
manifest {
attributes(
mapOf(
"Main-Class" to "no.nav.AppKt"
)
)
}
}
withType<Wrapper> {
gradleVersion = "7.0.2"
}
}