-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
36 lines (29 loc) · 1.19 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
plugins {
id("java-library")
}
group = "com.intermaticcore"
version = "bw-2023DEV-1"
repositories {
mavenCentral()
}
val natives: Configuration by configurations.creating
natives.isTransitive = true
dependencies {
implementation(group = "org.lwjgl.lwjgl", name = "lwjgl", version = "2.9.3")
implementation(group = "org.lwjgl.lwjgl", name = "lwjgl_util", version = "2.9.3")
natives(group = "org.lwjgl.lwjgl", name = "lwjgl-platform", version = "2.9.3", classifier = "natives-windows")
natives(group = "org.lwjgl.lwjgl", name = "lwjgl-platform", version = "2.9.3", classifier = "natives-linux")
natives(group = "org.lwjgl.lwjgl", name = "lwjgl-platform", version = "2.9.3", classifier = "natives-osx")
}
task("run", JavaExec::class) {
jvmArgs = listOf("-Dorg.lwjgl.librarypath=${project.projectDir.toPath()}\\run\\natives")
main = "com.intermaticcore.blockworld.core.Blockworld"
classpath = sourceSets["main"].runtimeClasspath
workingDir("${project.projectDir.toPath()}\\run")
dependsOn("extractNatives")
}
task("extractNatives", Copy::class) {
dependsOn(natives)
from(natives.map { zipTree(it) })
into("${project.projectDir.toPath()}\\run\\natives")
}