-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
59 lines (48 loc) · 1.01 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
plugins {
application
java
id("com.github.johnrengelman.shadow") version "8.1.1"
}
repositories {
mavenCentral()
}
dependencies {
implementation("org.json:json:20240303")
implementation(libs.guava)
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
}
}
tasks.jar {
from(sourceSets.main.get().output)
manifest {
attributes["Main-Class"] = application.mainClass.get()
}
}
tasks.shadowJar {
from(sourceSets.main.get().output)
archiveFileName.set("Magic.jar")
manifest {
attributes["Main-Class"] = application.mainClass.get()
}
}
tasks.named<CreateStartScripts>("startShadowScripts") {
dependsOn(tasks.jar)
}
tasks.named<Zip>("distZip") {
dependsOn(tasks.shadowJar)
}
tasks.named<Tar>("distTar") {
dependsOn(tasks.shadowJar)
}
tasks.named<CreateStartScripts>("startScripts") {
dependsOn(tasks.shadowJar)
}
application {
mainClass.set("nks.magic.emw.Main")
}
tasks.build {
dependsOn(tasks.shadowJar)
}