forked from faxzi0/Project-Zomboid-EtherHack
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle.kts
55 lines (45 loc) · 1.33 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
import org.gradle.jvm.tasks.Jar
import java.util.Properties
plugins {
java
}
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
}
fun loadProperties(): Properties {
return Properties().apply {
project.file("src/main/resources/EtherHack/EtherHack.properties").inputStream().use {
load(it)
}
}
}
group = "EtherHack"
version = loadProperties().getProperty("version").replace("'", "")
repositories {
mavenCentral()
}
dependencies {
implementation("org.projectlombok:lombok:1.18.36")
annotationProcessor("org.projectlombok:lombok:1.18.36")
implementation("org.ow2.asm:asm:9.7.1")
implementation("org.ow2.asm:asm-tree:9.7.1")
implementation(files("lib/fmod.jar"))
implementation(files("lib/zombie.jar"))
implementation(files("lib/Kahlua.jar"))
implementation(files("lib/org.jar"))
tasks.named<Jar>("jar") {
destinationDirectory.set(project.file("build"))
archiveFileName.set("EtherHack-${version}.jar")
manifest {
attributes["Main-Class"] = "EtherHack.Main"
}
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from(configurations.runtimeClasspath.get().map { file ->
if (file.isDirectory) {
file
} else {
zipTree(file)
}
})
}
}