-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathbuild.gradle.kts
132 lines (108 loc) · 4.23 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
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
group = "no.nav.pdfgen"
version = "2.0.0" //This will never change. See GitHub releases for docker image release
val javaVersion = JvmTarget.JVM_21
val handlebarsVersion = "4.3.1"
val jacksonVersion = "2.18.2"
val ktorVersion = "3.0.3"
val logbackVersion = "1.5.16"
val logstashEncoderVersion = "8.0"
val openHtmlToPdfVersion = "1.1.24"
val prometheusVersion = "0.16.0"
val junitJupiterVersion = "5.11.4"
val verapdfVersion = "1.26.1"
val ktfmtVersion = "0.44"
val testcontainersVersion = "1.20.4"
val pdfgencoreVersion = "1.1.38"
///Due to vulnerabilities
val commonsCompressVersion = "1.27.1"
val commonsIoVersion = "2.18.0"
plugins {
id("application")
kotlin("jvm") version "2.1.0"
id("com.diffplug.spotless") version "7.0.1"
id("com.gradleup.shadow") version "8.3.5"
id("com.github.ben-manes.versions") version "0.51.0"
}
application {
mainClass.set("no.nav.pdfgen.ApplicationKt")
}
kotlin {
compilerOptions {
jvmTarget.set(javaVersion)
}
}
tasks {
test {
useJUnitPlatform {}
testLogging {
events("passed", "skipped", "failed")
showStandardStreams = true
showStackTraces = true
exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
}
}
shadowJar {
archiveBaseName.set("app")
archiveClassifier.set("")
isZip64 = true
manifest {
attributes(
mapOf(
"Main-Class" to "no.nav.pdfgen.ApplicationKt",
),
)
}
}
spotless {
kotlin { ktfmt(ktfmtVersion).kotlinlangStyle() }
check {
dependsOn("spotlessApply")
}
}
}
repositories {
mavenCentral()
mavenLocal()
maven {
url = uri("https://github-package-registry-mirror.gc.nav.no/cached/maven-release")
}
}
dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib")
implementation("no.nav.pdfgen:pdfgen-core:$pdfgencoreVersion")
implementation("com.github.jknack:handlebars:$handlebarsVersion")
implementation("com.github.jknack:handlebars-jackson2:$handlebarsVersion")
implementation("io.github.openhtmltopdf:openhtmltopdf-pdfbox:$openHtmlToPdfVersion")
implementation("io.github.openhtmltopdf:openhtmltopdf-slf4j:$openHtmlToPdfVersion")
implementation("io.github.openhtmltopdf:openhtmltopdf-svg-support:$openHtmlToPdfVersion")
constraints {
implementation("commons-io:commons-io:$commonsIoVersion") {
because("Due to vulnerabilities in io.github.openhtmltopdf:openhtmltopdf-svg-support")
}
}
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jacksonVersion")
implementation("io.ktor:ktor-server-netty:$ktorVersion")
implementation("io.ktor:ktor-server-core:$ktorVersion")
implementation("io.ktor:ktor-serialization-jackson:$ktorVersion")
implementation("io.ktor:ktor-server-content-negotiation:$ktorVersion")
implementation("io.ktor:ktor-server-status-pages:$ktorVersion")
implementation("io.prometheus:simpleclient_common:$prometheusVersion")
implementation("io.prometheus:simpleclient_hotspot:$prometheusVersion")
implementation("org.verapdf:validation-model:$verapdfVersion")
implementation("ch.qos.logback:logback-classic:$logbackVersion")
implementation("net.logstash.logback:logstash-logback-encoder:$logstashEncoderVersion")
testImplementation("org.junit.jupiter:junit-jupiter-api:$junitJupiterVersion")
testImplementation("org.junit.jupiter:junit-jupiter-params:$junitJupiterVersion")
testImplementation("org.junit.jupiter:junit-jupiter-engine:$junitJupiterVersion")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
testImplementation("org.testcontainers:testcontainers:$testcontainersVersion")
constraints {
implementation("org.apache.commons:commons-compress:$commonsCompressVersion") {
because("Due to vulnerabilities, see CVE-2024-26308")
}
}
testImplementation("io.ktor:ktor-client-cio:$ktorVersion")
testImplementation("io.ktor:ktor-client-content-negotiation:$ktorVersion")
testImplementation("io.ktor:ktor-server-test-host:$ktorVersion")
}