-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.kts
126 lines (107 loc) · 4.64 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
123
124
125
126
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import com.github.jengelman.gradle.plugins.shadow.transformers.ServiceFileTransformer
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
group = "no.nav.syfo"
version = "1.0-SNAPSHOT"
val coroutinesVersion = "1.2.1"
val kluentVersion = "1.39"
val ktorVersion = "1.2.0"
val logbackVersion = "1.2.3"
val prometheusVersion = "0.5.0"
val spekVersion = "2.0.4"
val logstashEncoderVersion = "5.1"
val jacksonVersion = "2.9.8"
val postgresVersion = "42.2.5"
val h2Version = "1.4.197"
val flywayVersion = "5.2.4"
val hikariVersion = "3.3.0"
val vaultJavaDriveVersion = "3.1.0"
val mockkVersion = "1.9"
val kafkaVersion = "2.0.0"
val kafkaEmbeddedVersion = "2.0.2"
val smCommonVersion = "1.0.22"
tasks.withType<Jar> {
manifest.attributes["Main-Class"] = "no.nav.syfo.SyfooversiktApplicationKt"
}
plugins {
kotlin("jvm") version "1.3.21"
id("com.diffplug.gradle.spotless") version "3.18.0"
id("com.github.johnrengelman.shadow") version "4.0.4"
}
buildscript {
dependencies {
classpath("javax.xml.bind:jaxb-api:2.4.0-b180830.0359")
classpath("org.glassfish.jaxb:jaxb-runtime:2.4.0-b180830.0438")
classpath("com.sun.activation:javax.activation:1.2.0")
}
}
repositories {
mavenCentral()
jcenter()
maven(url = "https://dl.bintray.com/kotlin/ktor")
maven(url = "https://repo.adeo.no/repository/maven-releases/")
maven(url = "https://dl.bintray.com/spekframework/spek-dev")
maven(url = "https://dl.bintray.com/kotlin/kotlinx/")
maven(url = "http://packages.confluent.io/maven/")
}
dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-slf4j:$coroutinesVersion")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion")
implementation("io.prometheus:simpleclient_hotspot:$prometheusVersion")
implementation("io.prometheus:simpleclient_common:$prometheusVersion")
implementation("io.ktor:ktor-server-netty:$ktorVersion")
implementation("io.ktor:ktor-client-apache:$ktorVersion")
implementation("io.ktor:ktor-client-logging:$ktorVersion")
implementation("io.ktor:ktor-client-logging-jvm:$ktorVersion")
implementation("ch.qos.logback:logback-classic:$logbackVersion")
implementation("net.logstash.logback:logstash-logback-encoder:$logstashEncoderVersion")
implementation("com.fasterxml.jackson.core:jackson-databind:$jacksonVersion")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonVersion")
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jacksonVersion")
//Database
implementation("org.postgresql:postgresql:$postgresVersion")
implementation("com.h2database:h2:$h2Version")
implementation("com.zaxxer:HikariCP:$hikariVersion")
implementation("org.flywaydb:flyway-core:$flywayVersion")
implementation("com.bettercloud:vault-java-driver:$vaultJavaDriveVersion")
implementation("org.apache.kafka:kafka_2.12:$kafkaVersion")
implementation("no.nav.syfo.sm:syfosm-common-models:$smCommonVersion")
implementation("no.nav.syfo.sm:syfosm-common-kafka:$smCommonVersion")
compile("org.jetbrains.kotlinx:kotlinx-serialization-runtime:0.9.0")
compile("org.jetbrains.kotlinx:kotlinx-serialization-runtime-common:0.9.0")
compile("io.ktor:ktor-jackson:$ktorVersion")
compile("io.ktor:ktor-client-jackson:$ktorVersion")
compile("io.ktor:ktor-auth:$ktorVersion")
compile("io.ktor:ktor-auth-jwt:$ktorVersion")
testImplementation("no.nav:kafka-embedded-env:$kafkaEmbeddedVersion")
testImplementation("org.amshove.kluent:kluent:$kluentVersion")
testImplementation("org.spekframework.spek2:spek-dsl-jvm:$spekVersion")
testImplementation("io.ktor:ktor-server-test-host:$ktorVersion")
testImplementation("io.mockk:mockk:$mockkVersion")
testImplementation("org.testcontainers:postgresql:1.11.3")
testRuntimeOnly("org.spekframework.spek2:spek-runtime-jvm:$spekVersion")
testRuntimeOnly("org.spekframework.spek2:spek-runner-junit5:$spekVersion")
api("io.ktor:ktor-client-mock:$ktorVersion")
api("io.ktor:ktor-client-mock-jvm:$ktorVersion")
}
tasks {
create("printVersion") {
println(project.version)
}
withType<ShadowJar> {
transform(ServiceFileTransformer::class.java) {
setPath("META-INF/cxf")
include("bus-extensions.txt")
}
}
withType<KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
}
withType<Test> {
useJUnitPlatform {
includeEngines("spek2")
}
testLogging.showStandardStreams = true
}
}