-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
104 lines (86 loc) · 2.52 KB
/
build.gradle.kts
File metadata and controls
104 lines (86 loc) · 2.52 KB
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
plugins {
application
checkstyle
id("org.javamodularity.moduleplugin") version "1.8.15"
id("org.openjfx.javafxplugin") version "0.1.0"
id("org.beryx.jlink") version "3.0.1"
}
dependencies {
// logging
implementation(platform("org.slf4j:slf4j-bom:2.0.16"))
implementation("org.slf4j:slf4j-api")
implementation("org.slf4j:slf4j-simple")
// testing
testImplementation(platform("org.junit:junit-bom:5.11.4"))
testImplementation("org.junit.jupiter:junit-jupiter")
testImplementation(platform("org.mockito:mockito-bom:5.14.2"))
testImplementation("org.mockito:mockito-core")
// util
implementation("commons-io:commons-io:2.18.0")
implementation("org.apache.commons:commons-lang3:3.17.0")
implementation("uk.co.conoregan:themoviedbapi:2.3.1")
}
group = "uk.co.conoregan"
version = "2.0.1"
description = "ShowRenamer"
repositories {
mavenCentral()
}
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
modularity.inferModulePath = false
}
application {
mainModule.set("uk.co.conoregan.showrenamer")
mainClass.set("uk.co.conoregan.showrenamer.ShowRenamerApplication")
}
checkstyle {
toolVersion = "10.17.0"
configFile = file("config/checkstyle/checkstyle.xml")
}
tasks.withType<JavaCompile> {
modularity.inferModulePath = false
}
javafx {
version = "23.0.2"
modules("javafx.controls", "javafx.fxml")
}
tasks.test {
extensions.configure(org.javamodularity.moduleplugin.extensions.TestModuleOptions::class) {
runOnClasspath = true
}
useJUnitPlatform()
}
jlink {
options.set(listOf("--strip-debug", "--no-header-files", "--no-man-pages"))
launcher {
name = "Show Renamer"
}
forceMerge("slf4j")
jpackage {
val currentOs = org.gradle.internal.os.OperatingSystem.current()
val imgType = when {
currentOs.isWindows -> "ico"
currentOs.isMacOsX -> "icns"
else -> "png"
}
icon = "src/main/resources/images/show-renamer-icon.$imgType"
installerOptions.addAll(
listOf(
"--vendor", "Conor Egan",
"--app-version", version.toString()
)
)
if (currentOs.isWindows) {
installerOptions.addAll(
listOf(
"--win-per-user-install",
"--win-dir-chooser",
"--win-menu",
"--verbose"
)
)
}
}
}