-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
117 lines (109 loc) · 4.39 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
import org.gradle.api.tasks.testing.logging.TestLogEvent
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
val springSecurity = "6.4.0"
val snakeYaml = "2.3"
val mockk = "1.13.13"
val kotest = "5.9.1"
val gradleVersion = "8.4"
val json = "20240303"
val kotlinLoggin = "3.0.5"
val logbackStash = "8.0"
val logbackClassic = "1.5.12"
val mockOAuth2Server = "2.1.10"
val nimbus = "11.20.1"
val openapi = "2.6.0"
val unboundid = "7.0.1"
val wiremock = "3.0.1"
val wiremockCloud = "4.1.4"
val h2 = "2.3.232"
val jacksonDatatype = "2.18.1"
val conscrypt = "2.5.2"
val prometheus = "1.12.5"
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
plugins {
application
java
val kotlinVersion = "2.0.21"
kotlin("plugin.allopen") version kotlinVersion
id("org.jlleitschuh.gradle.ktlint") version "12.1.1"
id("com.github.ben-manes.versions") version "0.51.0"
id("org.springframework.boot") version "3.3.5"
id("org.jetbrains.kotlin.jvm") version kotlinVersion
id("org.jetbrains.kotlin.plugin.spring") version kotlinVersion
id("io.spring.dependency-management") version "1.1.6"
}
application {
mainClass.set("no.nav.gandalf.GandalfApplication")
}
repositories {
mavenCentral()
maven(url = "https://packages.confluent.io/maven")
maven(url = "https://kotlin.bintray.com/kotlinx")
}
dependencies {
implementation("ch.qos.logback:logback-classic:$logbackClassic")
implementation("ch.qos.logback:logback-core:$logbackClassic")
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jacksonDatatype")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonDatatype")
implementation("com.google.code.gson:gson")
implementation("com.nimbusds:oauth2-oidc-sdk:$nimbus")
implementation("com.unboundid:unboundid-ldapsdk:$unboundid")
implementation("io.github.microutils:kotlin-logging:$kotlinLoggin")
implementation("io.micrometer:micrometer-registry-prometheus:$prometheus")
implementation("javax.inject:javax.inject:1")
implementation("jakarta.validation:jakarta.validation-api")
implementation("net.logstash.logback:logstash-logback-encoder:$logbackStash")
implementation("jakarta.persistence:jakarta.persistence-api")
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("org.json:json:$json")
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
implementation("org.springframework.boot:spring-boot-starter-security")
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.conscrypt:conscrypt-openjdk:$conscrypt")
implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:$openapi")
implementation("org.yaml:snakeyaml:$snakeYaml")
runtimeOnly("com.oracle.database.jdbc:ojdbc8")
// test
testImplementation("com.h2database:h2:$h2")
testImplementation("no.nav.security:mock-oauth2-server:$mockOAuth2Server")
testImplementation("org.springframework.boot:spring-boot-starter-test") {
exclude(group = "com.vaadin.external.google", module = "android-json")
exclude(module = "junit")
}
testImplementation("org.springframework.security:spring-security-test:$springSecurity")
testImplementation("org.springframework.cloud:spring-cloud-contract-wiremock:$wiremockCloud")
testImplementation("org.junit.jupiter:junit-jupiter-api")
testImplementation("io.kotest:kotest-assertions-core:$kotest")
testImplementation("io.mockk:mockk:$mockk")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
}
tasks {
create("printVersion") {
println(project.version)
}
bootJar {
mainClass.set("no.nav.gandalf.GandalfApplication")
}
withType<Wrapper> {
gradleVersion = gradleVersion
distributionType = Wrapper.DistributionType.BIN
}
withType<KotlinCompile> {
compilerOptions {
freeCompilerArgs.add("-Xjsr305=strict")
jvmTarget.set(JvmTarget.JVM_21)
}
}
withType<Test> {
testLogging {
events(TestLogEvent.PASSED, TestLogEvent.SKIPPED, TestLogEvent.FAILED)
}
}
}