-
Notifications
You must be signed in to change notification settings - Fork 11
/
build.gradle.kts
36 lines (29 loc) · 1.16 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 = "net.minecraft"
version = "rd-131655"
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.mojang.rubydung.RubyDung"
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")
}