-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
104 lines (90 loc) · 3.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
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform
apply plugin: 'idea'
apply plugin: 'kotlin'
apply plugin: 'java'
buildscript {
ext.kotlin_version = '1.4.31'
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
jcenter()
maven { url 'https://jitpack.io' }
}
}
sourceSets {
main {
java {
srcDirs = ['src']
}
}
}
OperatingSystem os = DefaultNativePlatform.currentOperatingSystem
if (os.isLinux()) {
ext.lwjglNatives = "natives-linux"
} else if (os.isMacOsX()) {
ext.lwjglNatives = "natives-macos"
} else if (os.isWindows()) {
ext.lwjglNatives = "natives-windows"
}
ext {
lwjglVersion = "3.2.3"
jomlVersion = "1.10.1"
imguiVersion = '1.82.2'
}
dependencies {
// Kotlin sdk
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
// LWJGL sdk
implementation platform("org.lwjgl:lwjgl-bom:$lwjglVersion")
implementation "org.lwjgl:lwjgl"
runtimeOnly "org.lwjgl:lwjgl::$lwjglNatives"
// Open GL Window Library
implementation "org.lwjgl:lwjgl-glfw"
runtimeOnly "org.lwjgl:lwjgl-glfw::$lwjglNatives"
// Bit operations library
implementation "org.lwjgl:lwjgl-libdivide"
runtimeOnly "org.lwjgl:lwjgl-libdivide::$lwjglNatives"
// NanoVG
implementation "org.lwjgl:lwjgl-nanovg"
runtimeOnly "org.lwjgl:lwjgl-nanovg::$lwjglNatives"
// Nuklear
implementation "org.lwjgl:lwjgl-nuklear"
runtimeOnly "org.lwjgl:lwjgl-nuklear::$lwjglNatives"
// Audio Library
implementation "org.lwjgl:lwjgl-openal"
runtimeOnly "org.lwjgl:lwjgl-openal::$lwjglNatives"
// Graphics Library
implementation "org.lwjgl:lwjgl-opengl"
runtimeOnly "org.lwjgl:lwjgl-opengl::$lwjglNatives"
// Graphics Library for embedded systems such as Android
implementation "org.lwjgl:lwjgl-opengles"
runtimeOnly "org.lwjgl:lwjgl-opengles::$lwjglNatives"
// Custom allocators
implementation "org.lwjgl:lwjgl-jemalloc"
runtimeOnly "org.lwjgl:lwjgl-jemalloc::$lwjglNatives"
implementation "org.lwjgl:lwjgl-rpmalloc"
runtimeOnly "org.lwjgl:lwjgl-rpmalloc::$lwjglNatives"
// Fast Hash algorithms
implementation "org.lwjgl:lwjgl-xxhash"
runtimeOnly "org.lwjgl:lwjgl-xxhash::$lwjglNatives"
// STB images
implementation "org.lwjgl:lwjgl-stb:${lwjglVersion}"
runtimeOnly "org.lwjgl:lwjgl-stb::$lwjglNatives"
// Java Math Library
implementation "org.joml:joml:${jomlVersion}"
// ImGui sdk
implementation "io.github.spair:imgui-java-binding:$imguiVersion"
implementation "io.github.spair:imgui-java-lwjgl3:$imguiVersion"
implementation "io.github.spair:imgui-java-$lwjglNatives:$imguiVersion"
configurations.compile.resolvedConfiguration.getResolvedArtifacts().forEach {
if (it.moduleVersion.id.group == "org.lwjgl") {
runtime "org.lwjgl:${it.moduleVersion.id.name}:${it.moduleVersion.id.version}:${lwjglNatives}"
}
}
}