-
Notifications
You must be signed in to change notification settings - Fork 15
/
build.gradle.kts
112 lines (92 loc) · 2.79 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
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.asciidoctor.gradle.jvm.AsciidoctorTask
plugins {
application
jacoco
id("checkstyle")
id("com.github.johnrengelman.shadow") version "8.1.1"
id("com.github.kt3k.coveralls") version "2.12.2"
id("org.sonarqube") version "5.1.0.4882"
id("org.asciidoctor.jvm.convert") version "4.0.2"
}
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
implementation("com.fasterxml.jackson.core:jackson-databind:2.17.2")
implementation("com.google.code.gson:gson:2.11.0")
implementation("com.google.guava:guava:33.3.0-jre")
implementation("commons-cli:commons-cli:1.9.0")
implementation("commons-io:commons-io:2.16.1")
implementation("org.apache.commons:commons-csv:1.11.0")
implementation("org.apache.commons:commons-lang3:3.17.0")
implementation("org.atteo:evo-inflector:1.3")
implementation("org.slf4j:slf4j-api:2.0.16")
testImplementation("com.github.stefanbirkner:system-lambda:1.2.1")
testImplementation("org.assertj:assertj-core:3.26.3")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.11.0")
testImplementation("org.junit.jupiter:junit-jupiter-engine:5.11.0")
testImplementation("org.junit.jupiter:junit-jupiter-params:5.11.0")
testImplementation("org.mockito:mockito-core:5.13.0")
}
group = "org.fim"
version = "2.0.0-SNAPSHOT"
description = "Fim"
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
application {
mainClass.set("org.fim.Fim")
}
tasks.withType<JavaCompile>() {
options.encoding = "UTF-8"
}
tasks.named<Test>("test") {
useJUnitPlatform()
}
tasks.named<ShadowJar>("shadowJar") {
archiveBaseName.set("fim-fat")
archiveClassifier.set("")
archiveVersion.set("")
mergeServiceFiles()
}
tasks.named("distZip") {
dependsOn(tasks.named("shadowJar"))
}
tasks.named("distTar") {
dependsOn(tasks.named("shadowJar"))
}
tasks.named("startScripts") {
dependsOn(tasks.named("shadowJar"))
}
tasks.named("jar") {
dependsOn(tasks.named("startShadowScripts"))
dependsOn(tasks.named("shadowDistTar"))
dependsOn(tasks.named("shadowDistZip"))
}
tasks.withType<Checkstyle>().configureEach {
configFile = rootProject.file("checkstyle.xml")
}
tasks.named("check") {
dependsOn(tasks.named("checkstyleMain"))
dependsOn(tasks.named("checkstyleTest"))
}
tasks.named("jacocoTestReport") {
dependsOn(tasks.test)
}
tasks.withType<Javadoc>() {
options.encoding = "UTF-8"
}
tasks.withType<AsciidoctorTask>() {
setSourceDir(file("src/main/asciidoc"))
setBaseDir(file("src/main/asciidoc/docs"))
jvm {
jvmArgs = listOf(
"--add-opens", "java.base/sun.nio.ch=ALL-UNNAMED",
"--add-opens", "java.base/java.io=ALL-UNNAMED"
)
}
}