-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.kts
116 lines (97 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
113
114
115
116
plugins {
alias(libs.plugins.kotlin.jvm)
alias(libs.plugins.compose)
alias(libs.plugins.kotlin.compose)
alias(libs.plugins.kotlin.serialization)
alias(libs.plugins.shadow)
alias(libs.plugins.ktlint)
}
val mainFunction = "com.spoiligaming.explorer.MainKt"
repositories {
mavenCentral()
google()
maven("https://jitpack.io/")
}
dependencies {
implementation(libs.kotlin.stdlib)
implementation(libs.kotlin.reflect)
implementation(libs.kotlinx.serialization.json) {
exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib-common")
}
implementation(compose.desktop.windows_x64)
implementation(compose.desktop.linux_x64) // UNCONFIRMED
implementation(compose.desktop.linux_arm64) // UNCONFIRMED
implementation(compose.desktop.macos_x64) // UNCONFIRMED
implementation(compose.desktop.macos_arm64)
implementation(compose.components.resources)
implementation(compose.material3)
implementation(compose.materialIconsExtended)
// Compose libraries
implementation(libs.color.picker)
implementation(libs.file.kit)
// Other libraries
implementation(files("libraries/mcserverping-1.0.7.jar"))
implementation(libs.nbt)
implementation(libs.s4lfj.noop)
testImplementation(compose.desktop.uiTestJUnit4)
testImplementation(libs.kotlin.test)
}
tasks {
shadowJar {
mergeServiceFiles()
duplicatesStrategy = DuplicatesStrategy.FAIL
archiveFileName.set("ServerListExplorer.jar")
manifest {
attributes["Main-Class"] = mainFunction
}
from("LICENSE") {
into("")
}
}
jar {
from("LICENSE") {
into("")
}
}
}
compose {
desktop.application {
mainClass = mainFunction
javaHome = System.getenv("JDK_17")
buildTypes.release.proguard {
joinOutputJars.set(true)
obfuscate.set(true)
optimize.set(true)
configurationFiles.from(project.file("proguard-rules.pro"))
}
nativeDistributions {
licenseFile.set(project.file("LICENSE"))
}
}
resources {
publicResClass = false
generateResClass = always
customDirectory(
sourceSetName = "kotlin",
directoryProvider = provider { layout.projectDirectory.dir("composeResources") },
)
}
}
ktlint {
debug.set(false)
verbose.set(false)
android.set(false)
ignoreFailures.set(false)
enableExperimentalRules.set(true)
baseline.set(file("ktlint-baseline.xml"))
reporters {
reporter(org.jlleitschuh.gradle.ktlint.reporter.ReporterType.CHECKSTYLE)
}
filter {
exclude("**/generated/**")
include("**/kotlin/**")
}
}
kotlin {
jvmToolchain(11)
}