This repository was archived by the owner on Aug 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
68 lines (55 loc) · 1.76 KB
/
build.gradle
File metadata and controls
68 lines (55 loc) · 1.76 KB
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
plugins {
id 'java'
id 'com.github.johnrengelman.shadow' version '8.1.1'
id 'com.google.osdetector' version '1.7.3'
}
group = 'com.github.qpcrummer'
version = '1.0.2'
repositories {
mavenCentral()
}
project.ext.lwjglVersion = "3.3.4"
ext {
lwjglVersion = '3.3.4'
//LWJGL modules used: minimal OpenGL
lwjglModules = ['lwjgl', 'lwjgl-assimp', 'lwjgl-glfw', 'lwjgl-openal', 'lwjgl-opengl', 'lwjgl-stb']
platforms = ['windows', 'linux', 'macos']
}
dependencies {
testImplementation platform('org.junit:junit-bom:5.10.1')
testImplementation 'org.junit.jupiter:junit-jupiter'
implementation 'io.github.spair:imgui-java-app:1.86.11'
//get recommended dependency versions from the LWJGL BOM
implementation platform("org.lwjgl:lwjgl-bom:$lwjglVersion")
platforms.eachWithIndex { platform, index ->
//add LWJGL modules and the current OS's natives to the compile and runtime classpaths
lwjglModules.each {
implementation "org.lwjgl:$it"
if (it != 'lwjgl-egl') //lwjgl-egl has no native libraries
runtimeOnly "org.lwjgl:$it::natives-${platform}"
}
}
}
tasks.register('extractLwjglManifest', Copy) {
from {
configurations.compileClasspath.filter { it.name == "lwjgl-${lwjglVersion}.jar" }
.collect { zipTree(it) }
}
include 'META-INF/MANIFEST.MF'
into "$rootProject.layout.buildDirectory/tmp"
}
test {
useJUnitPlatform()
}
shadowJar {
manifest {
attributes(
'Main-Class': 'com.github.qpcrummer.Main'
)
}
archiveClassifier.set('')
archiveVersion.set('')
}
tasks.register('printVersionName') {
println version
}