forked from navikt/syfo-tilgangskontroll
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
90 lines (73 loc) · 2.98 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
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import com.github.jengelman.gradle.plugins.shadow.transformers.PropertiesFileTransformer
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
group = "no.nav.syfo"
version = "1.0.0"
val apacheHttpClientVersion = "4.5.13"
val kotlinJacksonVersion = "2.13.2"
val logbackVersion = "7.1.1"
val prometheusVersion = "1.8.5"
val slf4jVersion = "1.7.36"
val tokenValidationSpringSupportVersion = "1.3.9"
val logbackSyslog4jVersion = "1.0.0"
plugins {
kotlin("jvm") version "1.6.20"
id("org.jetbrains.kotlin.plugin.allopen") version "1.6.20"
id("org.springframework.boot") version "2.6.7"
id("io.spring.dependency-management") version "1.0.11.RELEASE"
id("com.github.johnrengelman.shadow") version "7.1.1"
id("org.jlleitschuh.gradle.ktlint") version "10.2.1"
}
allOpen {
annotation("org.springframework.context.annotation.Configuration")
annotation("org.springframework.stereotype.Service")
annotation("org.springframework.stereotype.Component")
}
repositories {
mavenCentral()
}
dependencies {
implementation(kotlin("stdlib"))
implementation(kotlin("reflect"))
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:$kotlinJacksonVersion")
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("org.springframework.boot:spring-boot-starter-aop")
implementation("org.springframework.boot:spring-boot-starter-data-redis")
implementation("org.springframework.boot:spring-boot-starter-jersey")
implementation("org.springframework.boot:spring-boot-starter-logging")
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("no.nav.security:token-validation-spring:$tokenValidationSpringSupportVersion")
implementation("org.slf4j:slf4j-api:$slf4jVersion")
implementation("net.logstash.logback:logstash-logback-encoder:$logbackVersion")
implementation("io.micrometer:micrometer-registry-prometheus:$prometheusVersion")
implementation("org.apache.httpcomponents:httpclient:$apacheHttpClientVersion")
implementation("com.papertrailapp:logback-syslog4j:$logbackSyslog4jVersion")
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("no.nav.security:token-validation-test-support:$tokenValidationSpringSupportVersion")
}
tasks {
withType<Jar> {
manifest.attributes["Main-Class"] = "no.nav.syfo.ApplicationKt"
}
create("printVersion") {
doLast {
println(project.version)
}
}
test {
useJUnitPlatform()
}
withType<ShadowJar> {
archiveBaseName.set("app")
archiveClassifier.set("")
archiveVersion.set("")
transform(PropertiesFileTransformer::class.java) {
paths = listOf("META-INF/spring.factories")
mergeStrategy = "append"
}
mergeServiceFiles()
}
withType<KotlinCompile> {
kotlinOptions.jvmTarget = "11"
}
}