-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
66 lines (55 loc) · 1.55 KB
/
build.gradle.kts
File metadata and controls
66 lines (55 loc) · 1.55 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
/*
* CDPrintable: A program that prints labels with track listings for your CD cases.
* Copyright (C) 2025 Alexander McLean
*
* This source code is licensed under the GNU General Public License v3.0
* found in the LICENSE file in the root directory of this source tree.
*
* This is the main build file.
*/
import java.util.Properties
import java.io.FileInputStream
val versionProperties = Properties()
file("src/main/resources/version.properties").takeIf { it.exists() }?.let {
versionProperties.load(FileInputStream(it))
}
plugins {
id("java")
id("application")
application
id("com.github.johnrengelman.shadow") version "8.1.1"
}
group = "org.example"
version = versionProperties.getProperty("version", "0.0-VERSION-ERROR")
repositories {
mavenCentral()
}
dependencies {
testImplementation(platform("org.junit:junit-bom:5.10.0"))
testImplementation("org.junit.jupiter:junit-jupiter")
implementation("com.google.code.gson:gson:2.12.1")
testImplementation("com.squareup.okhttp3:mockwebserver:4.12.0")
}
tasks.test {
useJUnitPlatform()
}
application {
mainClass.set("com.CDPrintable.Main")
applicationDefaultJvmArgs = listOf("-Djava.library.path=build/libs")
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(22))
}
}
tasks.named<Jar>("jar") {
manifest {
attributes(
"Main-Class" to "com.CDPrintable.Main"
)
}
}
tasks.withType<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar> {
archiveClassifier.set("all")
mergeServiceFiles()
}