forked from navikt/pdfgen-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
139 lines (115 loc) · 4.4 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
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
group = "no.nav.pdfgen"
version = properties["version"]?.takeIf { it is String && it.isNotEmpty() && it != "unspecified" } ?: "local-build"
println(version)
val handlebarsVersion = "4.3.1"
val jacksonVersion = "2.18.0"
val jaxbVersion = "4.0.5"
val jaxbApiVersion = "2.3.1"
val jsoupVersion = "1.18.1"
val kluentVersion = "1.72"
val logbackVersion = "1.5.10"
val logstashEncoderVersion = "8.0"
val openHtmlToPdfVersion = "1.1.22"
val prometheusVersion = "0.16.0"
val junitJupiterVersion = "5.11.2"
val verapdfVersion = "1.26.1"
val ktfmtVersion = "0.44"
val kotlinloggerVersion = "7.0.0"
val kotestVersion = "5.9.1"
val javaVersion = JvmTarget.JVM_21
plugins {
kotlin("jvm") version "2.0.21"
id("com.diffplug.spotless") version "6.25.0"
id("com.gradleup.shadow") version "8.3.3"
id("com.github.ben-manes.versions") version "0.51.0"
id("maven-publish")
id("java-library")
}
kotlin {
compilerOptions {
jvmTarget.set(javaVersion)
}
}
tasks {
test {
useJUnitPlatform()
testLogging {
events("passed", "skipped", "failed")
showStackTraces = true
exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
}
}
spotless {
kotlin { ktfmt(ktfmtVersion).kotlinlangStyle() }
check {
dependsOn("spotlessApply")
}
}
}
repositories {
mavenCentral()
mavenLocal()
}
dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib")
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")
implementation("org.jsoup:jsoup:$jsoupVersion")
implementation("com.fasterxml.jackson.core:jackson-core:$jacksonVersion")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonVersion")
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jacksonVersion")
implementation("javax.xml.bind:jaxb-api:$jaxbApiVersion")
implementation("org.glassfish.jaxb:jaxb-runtime:$jaxbVersion")
implementation("io.prometheus:simpleclient_common:$prometheusVersion")
implementation("io.prometheus:simpleclient_hotspot:$prometheusVersion")
implementation("org.verapdf:validation-model:$verapdfVersion")
implementation("io.github.oshai:kotlin-logging-jvm:$kotlinloggerVersion")
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("io.kotest:kotest-assertions-core:$kotestVersion")
testImplementation("io.kotest:kotest-property:$kotestVersion")
}
java {
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
create<MavenPublication>("maven") {
from(components["java"])
pom {
licenses {
license {
name.set("MIT License")
name = "MIT License"
url = "https://opensource.org/licenses/MIT"
}
}
scm {
connection = "scm:git:https://github.com/navikt/pdfgen-core.git"
developerConnection = "scm:git:https://github.com/navikt/pdfgen-core.git"
url = "https://github.com/navikt/pdfgen-core"
}
}
}
}
repositories {
maven {
name = "pdfgen-core"
description = "Bibliotek som inneholder kode for å generere PDF"
url = uri("https://maven.pkg.github.com/navikt/pdfgen-core")
credentials {
username = System.getenv("GITHUB_USERNAME")
password = System.getenv("GITHUB_PASSWORD")
}
}
}
}