-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
76 lines (64 loc) · 2.45 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
import org.gradle.internal.os.OperatingSystem
plugins {
id 'java'
id 'idea'
id 'application'
id 'com.github.johnrengelman.shadow' version '5.2.0'
}
repositories {
mavenCentral()
}
group 'codedcosmos.vulkantriangles'
version '0.1-INDEV'
apply plugin: 'java'
sourceCompatibility = 1.11
targetCompatibility = 1.11
sourceSets {
main.java.srcDirs = ['source/src']
main.resources.srcDirs = ['source/res']
test.java.srcDirs = ['source/tst']
test.resources.srcDirs = ['source/res']
}
project.ext.lwjglVersion = "3.2.3"
project.ext.jomlVersion = "1.9.20"
project.ext.steamworks4jVersion = "1.8.0"
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 = "natives-windows"
break
}
dependencies {
testImplementation group: 'junit', name: 'junit', version: '4.12'
implementation platform("org.lwjgl:lwjgl-bom:$lwjglVersion")
implementation "org.lwjgl:lwjgl"
implementation "org.lwjgl:lwjgl-glfw"
implementation "org.lwjgl:lwjgl-lz4"
implementation "org.lwjgl:lwjgl-openal"
implementation "org.lwjgl:lwjgl-shaderc"
implementation "org.lwjgl:lwjgl-vma"
implementation "org.lwjgl:lwjgl-vulkan"
implementation "org.lwjgl:lwjgl-xxhash"
runtimeOnly "org.lwjgl:lwjgl::$lwjglNatives"
runtimeOnly "org.lwjgl:lwjgl-glfw::$lwjglNatives"
runtimeOnly "org.lwjgl:lwjgl-lz4::$lwjglNatives"
runtimeOnly "org.lwjgl:lwjgl-openal::$lwjglNatives"
runtimeOnly "org.lwjgl:lwjgl-shaderc::$lwjglNatives"
runtimeOnly "org.lwjgl:lwjgl-vma::$lwjglNatives"
if (lwjglNatives == "natives-macos") runtimeOnly "org.lwjgl:lwjgl-vulkan::$lwjglNatives"
runtimeOnly "org.lwjgl:lwjgl-xxhash::$lwjglNatives"
implementation "org.joml:joml:${jomlVersion}"
implementation "com.code-disaster.steamworks4j:steamworks4j:${steamworks4jVersion}"
implementation "org.lwjgl:lwjgl-jemalloc"
runtimeOnly "org.lwjgl:lwjgl-jemalloc::$lwjglNatives"
implementation "org.lwjgl:lwjgl-assimp"
runtimeOnly "org.lwjgl:lwjgl-assimp::$lwjglNatives"
}