-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
96 lines (83 loc) · 3.9 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
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("org.springframework.boot") version "3.4.1"
id("io.spring.dependency-management") version "1.1.7"
id("io.gitlab.arturbosch.detekt") version "1.23.7"
kotlin("jvm") version "2.0.10"
kotlin("plugin.spring") version "2.0.10"
}
group = "no.nav.syfo"
version = "0.0.1-SNAPSHOT"
java.sourceCompatibility = JavaVersion.VERSION_21
repositories {
mavenCentral()
maven {
url = uri("https://github-package-registry-mirror.gc.nav.no/cached/maven-release")
}
}
val tokenSupportVersion = "4.1.8"
val logstashLogbackEncoderVersion = "8.0"
val kotestVersion = "5.9.1"
val springKotestExtensionVersion = "1.3.0"
val kotestTestContainersExtensionVersion = "2.0.2"
val mockkVersion = "1.13.16"
val wiremockVersion = "3.10.0"
val wiremockKotestExtensionVersion = "3.1.0"
val detektVersion = "1.23.7"
val testcontainersVersion = "1.20.4"
val springMockkVersion = "4.0.2"
dependencies {
implementation("org.springframework.boot:spring-boot-starter")
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("org.springframework.boot:spring-boot-starter-validation")
implementation("org.springframework.boot:spring-boot-starter-data-jdbc")
implementation("org.flywaydb:flyway-core")
implementation("org.flywaydb:flyway-database-postgresql")
implementation("org.postgresql:postgresql")
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("org.springframework.kafka:spring-kafka")
implementation("no.nav.security:token-client-spring:$tokenSupportVersion")
implementation("no.nav.security:token-validation-spring:$tokenSupportVersion")
implementation("io.micrometer:micrometer-registry-prometheus")
implementation("net.logstash.logback:logstash-logback-encoder:$logstashLogbackEncoderVersion")
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("org.springframework.boot:spring-boot-testcontainers")
testImplementation("org.springframework.kafka:spring-kafka-test")
testImplementation("io.mockk:mockk:$mockkVersion")
testImplementation("io.kotest:kotest-runner-junit5:$kotestVersion")
testImplementation("io.kotest:kotest-runner-junit5-jvm:$kotestVersion")
testImplementation("io.kotest:kotest-assertions-core:$kotestVersion")
testImplementation("io.kotest:kotest-property:$kotestVersion")
testImplementation("io.kotest.extensions:kotest-extensions-testcontainers:$kotestTestContainersExtensionVersion")
testImplementation("io.kotest.extensions:kotest-extensions-spring:$springKotestExtensionVersion")
testImplementation("io.kotest.extensions:kotest-extensions-wiremock:$wiremockKotestExtensionVersion")
testImplementation("org.wiremock:wiremock-standalone:$wiremockVersion")
testImplementation("no.nav.security:token-validation-spring-test:$tokenSupportVersion")
testImplementation("org.testcontainers:testcontainers:$testcontainersVersion")
testImplementation("org.testcontainers:postgresql:$testcontainersVersion")
testImplementation("org.testcontainers:kafka:$testcontainersVersion")
testImplementation("org.testcontainers:junit-jupiter:$testcontainersVersion")
testImplementation("com.ninja-squad:springmockk:$springMockkVersion")
detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:$detektVersion")
}
tasks.named<org.springframework.boot.gradle.tasks.bundling.BootJar>("bootJar") {
this.archiveFileName.set("app.jar")
}
tasks.withType<KotlinCompile> {
compilerOptions {
freeCompilerArgs.add("-Xjsr305=strict")
jvmTarget.set(JvmTarget.JVM_21)
}
}
tasks.named<Jar>("jar") {
enabled = false
}
tasks.withType<Test> {
useJUnitPlatform()
}
detekt {
config.from("detekt-config.yml")
buildUponDefaultConfig = true
}