-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
47 lines (36 loc) · 941 Bytes
/
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
plugins {
id("java")
}
group = "oolloo"
version = "1.4.3"
repositories {
mavenCentral()
}
java {
sourceCompatibility = JavaVersion.VERSION_1_6
targetCompatibility = JavaVersion.VERSION_1_6
}
tasks.register<Exec>("zigBuild") {
mustRunAfter("clearLibs")
commandLine("zig", "build", "--release=fast")
}
tasks.register<Copy>("copyLibs") {
mustRunAfter("zigBuild")
from("zig-out/bin")
include("**/*.dll")
into("src/main/resources")
}
tasks.findByPath(":processResources")?.mustRunAfter("copyLibs")
tasks.register<Delete>("clearLibs") {
delete("zig-out/lib", "zig-out/bin", "src/main/resources")
}
tasks.findByPath(":clean")?.dependsOn("clearLibs")
tasks.jar {
dependsOn("clearLibs", "zigBuild", "copyLibs")
manifest {
attributes ( mapOf (
"Main-Class" to "oolloo.jlw.Wrapper",
"Add-Opens" to "java.base/jdk.internal.loader"
) )
}
}