-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
63 lines (54 loc) · 1.5 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
63 lines (54 loc) · 1.5 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
plugins {
java
application
}
group = "st3ix"
version = "1.0.4"
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
application {
mainClass.set("st3ix.obfuscator.gui.Launcher")
}
repositories {
mavenCentral()
}
dependencies {
implementation("org.ow2.asm:asm:9.6")
implementation("org.ow2.asm:asm-commons:9.6")
implementation("org.yaml:snakeyaml:2.2")
}
tasks.test {
useJUnitPlatform()
}
tasks.jar {
manifest {
attributes["Main-Class"] = "st3ix.obfuscator.gui.Launcher"
attributes["Implementation-Version"] = version
}
}
tasks.register<Jar>("fatJar") {
archiveBaseName.set("st3ix-obfuscator")
archiveClassifier.set("all")
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
manifest {
attributes["Main-Class"] = "st3ix.obfuscator.gui.Launcher"
attributes["Implementation-Version"] = project.version
}
from(configurations.runtimeClasspath.get().map { if (it.isDirectory) it else zipTree(it) })
from(sourceSets.main.get().output)
from("Images") { into("Images") }
dependsOn(tasks.classes)
}
tasks.register<Copy>("dist") {
dependsOn("fatJar")
val releaseVersion = project.findProperty("releaseVersion")?.toString() ?: version.toString()
from(tasks.named<Jar>("fatJar")) {
rename { "st3ix-obfuscator-v${releaseVersion}.jar" }
}
from("scripts/run.bat")
from("config.yml.example")
from("Images")
into(layout.buildDirectory.dir("dist"))
}