-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
181 lines (153 loc) · 6.75 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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
import com.expediagroup.graphql.plugin.gradle.tasks.GraphQLGenerateClientTask
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("org.springframework.boot") version "3.4.3"
id("io.spring.dependency-management") version "1.1.7"
id("com.expediagroup.graphql") version "8.3.0"
kotlin("jvm") version "2.1.10"
kotlin("plugin.spring") version "2.1.10"
kotlin("plugin.jpa") version "2.1.10"
}
group = "no.nav"
version = "0.0.1-SNAPSHOT"
java.sourceCompatibility = JavaVersion.VERSION_21
configurations {
compileOnly {
extendsFrom(configurations.annotationProcessor.get())
}
testCompileOnly {
exclude(group="junit", module = "junit")
}
}
val graphQLKotlinVersion = "8.3.0"
val springCloudVersion = "4.2.0"
val springdocVersion = "2.8.5"
val logstashLogbackEncoderVersion = "8.0"
val tokenSupportVersion = "5.0.17"
val k9FormatVersion = "9.5.2"
val retryVersion = "2.0.11"
val zalandoVersion = "0.27.0"
val postgresqlVersion = "42.7.5"
val hibernateTypes52Version = "2.20.0"
val awailitilityKotlinVersion = "4.3.0"
val assertkJvmVersion = "0.28.1"
val springMockkVersion = "4.0.2"
val mockkVersion = "1.13.16"
val guavaVersion = "33.4.0-jre"
val orgJsonVersion = "20250107"
val k9FellesVersion = "2.0.8"
val k9FormidlingVersion = "1.0.7"
val k9SakVersion = "4.1.8"
val openhtmltopdfVersion = "1.0.10"
val handlebarsVersion = "4.4.0"
val testcontainersVersion ="1.20.5"
repositories {
mavenCentral()
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/navikt/dusseldorf-ktor")
credentials {
username = project.findProperty("gpr.user") as String? ?: "k9-sak-innsyn-api"
password = project.findProperty("gpr.key") as String? ?: System.getenv("GITHUB_TOKEN")
}
}
}
dependencies {
implementation("org.yaml:snakeyaml:2.4") {
because("https://github.com/navikt/k9-sak-innsyn-api/security/dependabot/2")
}
// NAV
implementation("no.nav.k9:soknad:$k9FormatVersion")
implementation("no.nav.k9:innsyn:$k9FormatVersion")
implementation("no.nav.k9:konstant:$k9FormatVersion")
implementation("no.nav.k9.formidling:eksterne-kontrakter:$k9FormidlingVersion")
implementation("no.nav.k9.sak:kodeverk:$k9SakVersion")
implementation("no.nav.security:token-validation-spring:$tokenSupportVersion")
implementation("no.nav.security:token-client-spring:$tokenSupportVersion")
testImplementation("no.nav.security:token-validation-spring-test:$tokenSupportVersion")
// Spring Boot
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
implementation("org.springframework.boot:spring-boot-starter-validation")
implementation("org.springframework.boot:spring-boot-starter-web") {
//exclude(group = "org.springframework.boot", module = "spring-boot-starter-tomcat")
}
//implementation("org.springframework.boot:spring-boot-starter-jetty") /// TODO: Til jetty får støtte fro Servlet 6.0
implementation("org.springframework.retry:spring-retry:$retryVersion")
implementation("org.springframework:spring-aspects")
annotationProcessor("org.springframework.boot:spring-boot-configuration-processor")
annotationProcessor("org.springframework.boot:spring-boot-autoconfigure-processor")
testImplementation("org.springframework.boot:spring-boot-starter-test") {
exclude(module = "mockito-core")
}
// Spring Cloud
// https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-starter-contract-stub-runner
testImplementation("org.springframework.cloud:spring-cloud-starter-contract-stub-runner:$springCloudVersion")
//graphql
implementation("com.expediagroup:graphql-kotlin-spring-client:$graphQLKotlinVersion")
// Swagger (openapi 3)
implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:$springdocVersion")
// Metrics
implementation("io.micrometer:micrometer-registry-prometheus")
// Logging
implementation("net.logstash.logback:logstash-logback-encoder:$logstashLogbackEncoderVersion")
implementation("no.nav.k9.felles:k9-felles-log:$k9FellesVersion")
runtimeOnly("com.papertrailapp:logback-syslog4j:1.0.0")
// Database
runtimeOnly("org.postgresql:postgresql:$postgresqlVersion")
implementation("org.flywaydb:flyway-core")
implementation("org.flywaydb:flyway-database-postgresql")
testImplementation("org.testcontainers:junit-jupiter:$testcontainersVersion")
testImplementation("org.testcontainers:postgresql:$testcontainersVersion")
// Kotlin
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-reactor")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core")
//Kafka
implementation("org.springframework.kafka:spring-kafka")
constraints {
implementation("org.scala-lang:scala-library") {
because("org.apache.kafka:kafka_2.13:3.3.2 -> https://www.cve.org/CVERecord?id=CVE-2022-36944")
version {
require("2.13.9")
}
}
}
testImplementation("org.springframework.kafka:spring-kafka-test")
// PDF
implementation("com.openhtmltopdf:openhtmltopdf-pdfbox:$openhtmltopdfVersion")
implementation("com.openhtmltopdf:openhtmltopdf-slf4j:$openhtmltopdfVersion")
implementation("com.github.jknack:handlebars:$handlebarsVersion")
// Diverse
implementation("org.json:json:$orgJsonVersion")
implementation("com.google.guava:guava:$guavaVersion")
testImplementation("org.awaitility:awaitility-kotlin:$awailitilityKotlinVersion")
testImplementation("com.willowtreeapps.assertk:assertk-jvm:$assertkJvmVersion")
testImplementation("com.ninja-squad:springmockk:$springMockkVersion")
testImplementation("io.mockk:mockk:$mockkVersion")
testImplementation("org.testcontainers:testcontainers:$testcontainersVersion")
}
tasks {
withType<Test> {
useJUnitPlatform()
}
withType<KotlinCompile> {
kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict")
jvmTarget = "21"
}
}
getByName<Jar>("jar") {
enabled = false
}
withType<Wrapper> {
gradleVersion = "8.2.1"
}
}
val graphqlGenerateOtherClient by tasks.creating(GraphQLGenerateClientTask::class) {
queryFileDirectory.set(file("${project.projectDir}/src/main/resources/safselvbetjening"))
schemaFile.set(file("${project.projectDir}/src/main/resources/safselvbetjening/saf-selvbetjening-sdl.graphqls"))
packageName.set("no.nav.sifinnsynapi.safselvbetjening.generated")
}