-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
53 lines (49 loc) · 2.06 KB
/
build.gradle
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
plugins {
id 'java'
}
group 'org.example'
version '1.0-SNAPSHOT'
repositories {
mavenCentral()
}
import org.gradle.internal.os.OperatingSystem
project.ext.jomlVersion = "1.9.2"
switch (OperatingSystem.current()) {
case OperatingSystem.LINUX:
def osArch = System.getProperty("os.arch")
project.ext.lwjglNatives = osArch.startsWith("arm") || osArch.startsWith("aarch64")
? "natives-linux-${osArch.contains("64") || osArch.startsWith("armv8") ? "arm64" : "arm32"}"
: "natives-linux"
break
case OperatingSystem.MAC_OS:
project.ext.lwjglNatives = "natives-macos"
break
case OperatingSystem.WINDOWS:
project.ext.lwjglNatives = System.getProperty("os.arch").contains("64") ? "natives-windows" : "natives-windows-x86"
break
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.0'
// https://mvnrepository.com/artifact/org.lwjgl/lwjgl-opengl
implementation group: 'org.lwjgl', name: 'lwjgl-opengl', version: '3.2.3'
// https://mvnrepository.com/artifact/org.lwjgl/lwjgl
implementation group: 'org.lwjgl', name: 'lwjgl', version: '3.2.3'
// https://mvnrepository.com/artifact/org.lwjgl/lwjgl-glfw
implementation group: 'org.lwjgl', name: 'lwjgl-glfw', version: '3.2.3'
// https://mvnrepository.com/artifact/org.lwjgl/lwjgl-openal
runtimeOnly group: 'org.lwjgl', name: 'lwjgl-openal', version: '3.2.3'
//https://search.maven.org/artifact/com.pngencoder/pngencoder/0.12.0/jar
implementation 'com.pngencoder:pngencoder:0.12.0'
runtimeOnly "org.lwjgl:lwjgl::$lwjglNatives"
//runtimeOnly "org.lwjgl:lwjgl-assimp::$lwjglNatives"
runtimeOnly "org.lwjgl:lwjgl-openal::$lwjglNatives"
runtimeOnly "org.lwjgl:lwjgl-opengl::$lwjglNatives"
runtimeOnly "org.lwjgl:lwjgl-glfw::$lwjglNatives"
//runtimeOnly "org.lwjgl:lwjgl-stb::$lwjglNatives"
}
test {
useJUnitPlatform()
}
sourceCompatibility = JavaVersion.VERSION_16
targetCompatibility = JavaVersion.VERSION_16