-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.kts
84 lines (68 loc) · 2.64 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
plugins {
kotlin("jvm") version "1.9.23"
}
group = "org.openartifact"
version = "1.0-SNAPSHOT"
val lwjglNatives = Pair(
System.getProperty("os.name")!!,
System.getProperty("os.arch")!!
).let { (name, arch) ->
when {
arrayOf("Linux", "SunOS", "Unit").any { name.startsWith(it) } ->
if (arrayOf("arm", "aarch64").any { arch.startsWith(it) })
"natives-linux${if (arch.contains("64") || arch.startsWith("armv8")) "-arm64" else "-arm32"}"
else if (arch.startsWith("ppc"))
"natives-linux-ppc64le"
else if (arch.startsWith("riscv"))
"natives-linux-riscv64"
else
"natives-linux"
arrayOf("Windows").any { name.startsWith(it) } ->
"natives-windows"
else ->
throw Error("Unrecognized or unsupported platform. Please set \"lwjglNatives\" manually")
}
}
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
val kotlinVersion = project.properties["kotlin_version"].toString()
dependencies {
implementation("io.github.classgraph:classgraph:4.8.172")
// Kotlin-reflect
implementation(kotlin("reflect"))
// Gson
implementation("com.google.code.gson:gson:2.11.0")
// glm
implementation("io.github.kotlin-graphics:glm:0.9.9.1-12")
// SLF4J
implementation("org.slf4j:slf4j-api:2.0.13")
implementation("org.slf4j:slf4j-simple:2.0.13")
// Kotlinx
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1-Beta")
// Apache Commons
implementation("org.apache.commons:commons-collections4:4.5.0-M1")
// LWJGL
implementation(platform("org.lwjgl:lwjgl-bom:3.3.3"))
implementation("org.lwjgl", "lwjgl")
implementation("org.lwjgl", "lwjgl-assimp")
implementation("org.lwjgl", "lwjgl-glfw")
implementation("org.lwjgl", "lwjgl-nfd")
implementation("org.lwjgl", "lwjgl-openal")
implementation("org.lwjgl", "lwjgl-opengl")
implementation("org.lwjgl", "lwjgl-stb")
runtimeOnly("org.lwjgl", "lwjgl", classifier = lwjglNatives)
runtimeOnly("org.lwjgl", "lwjgl-assimp", classifier = lwjglNatives)
runtimeOnly("org.lwjgl", "lwjgl-glfw", classifier = lwjglNatives)
runtimeOnly("org.lwjgl", "lwjgl-nfd", classifier = lwjglNatives)
runtimeOnly("org.lwjgl", "lwjgl-openal", classifier = lwjglNatives)
runtimeOnly("org.lwjgl", "lwjgl-opengl", classifier = lwjglNatives)
runtimeOnly("org.lwjgl", "lwjgl-stb", classifier = lwjglNatives)
}
tasks.test {
useJUnitPlatform()
}
kotlin {
jvmToolchain(17)
}