-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
103 lines (86 loc) · 3.58 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
import org.gradle.internal.os.OperatingSystem
apply plugin: 'java'
apply plugin: 'java-library'
version = "${arc3d_version}"
group = 'icyllis.arc3d'
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
repositories {
mavenCentral()
mavenLocal()
}
dependencies {
compileOnly 'com.google.code.findbugs:jsr305:3.0.2'
compileOnly 'org.jetbrains:annotations:23.1.0'
api "org.slf4j:slf4j-api:2.0.9"
implementation "it.unimi.dsi:fastutil:${fastutil_version}"
def lwjglNatives
switch (OperatingSystem.current()) {
case OperatingSystem.WINDOWS:
def osArch = System.getProperty("os.arch")
lwjglNatives = osArch.contains("64")
? "natives-windows${osArch.startsWith("aarch64") ? "-arm64" : ""}"
: "natives-windows-x86"
break
case OperatingSystem.MAC_OS:
lwjglNatives = System.getProperty("os.arch").startsWith("aarch64") ? "natives-macos-arm64" : "natives-macos"
break
default:
def osArch = System.getProperty("os.arch")
lwjglNatives = osArch.startsWith("arm") || osArch.startsWith("aarch64")
? "natives-linux-${osArch.contains("64") || osArch.startsWith("armv8") ? "arm64" : "arm32"}"
: "natives-linux"
break
}
implementation platform("org.lwjgl:lwjgl-bom:${lwjgl_version}")
implementation "org.lwjgl:lwjgl"
implementation "org.lwjgl:lwjgl-jemalloc"
implementation "org.lwjgl:lwjgl-opengl"
implementation "org.lwjgl:lwjgl-opengles"
implementation "org.lwjgl:lwjgl-vma"
implementation "org.lwjgl:lwjgl-vulkan"
runtimeOnly "org.lwjgl:lwjgl::$lwjglNatives"
runtimeOnly "org.lwjgl:lwjgl-jemalloc::$lwjglNatives"
runtimeOnly "org.lwjgl:lwjgl-opengl::$lwjglNatives"
runtimeOnly "org.lwjgl:lwjgl-opengles::$lwjglNatives"
runtimeOnly "org.lwjgl:lwjgl-vma::$lwjglNatives"
if (lwjglNatives == "natives-macos" || lwjglNatives == "natives-macos-arm64") {
runtimeOnly "org.lwjgl:lwjgl-vulkan::$lwjglNatives"
}
compileOnly "org.lwjgl:lwjgl-spvc" // we only use the Spv header
testImplementation "org.lwjgl:lwjgl-glfw"
testImplementation "org.lwjgl:lwjgl-stb"
testImplementation "org.lwjgl:lwjgl-shaderc"
testImplementation "org.lwjgl:lwjgl-ktx"
testImplementation "org.lwjgl:lwjgl-tinyfd"
testImplementation "org.lwjgl:lwjgl-spvc"
testRuntimeOnly "org.lwjgl:lwjgl-glfw::$lwjglNatives"
testRuntimeOnly "org.lwjgl:lwjgl-stb::$lwjglNatives"
testRuntimeOnly "org.lwjgl:lwjgl-shaderc::$lwjglNatives"
testRuntimeOnly "org.lwjgl:lwjgl-ktx::$lwjglNatives"
testRuntimeOnly "org.lwjgl:lwjgl-tinyfd::$lwjglNatives"
testRuntimeOnly "org.lwjgl:lwjgl-spvc::$lwjglNatives"
testImplementation "org.slf4j:slf4j-simple:2.0.9"
testImplementation 'org.openjdk.jmh:jmh-core:1.35'
testAnnotationProcessor 'org.openjdk.jmh:jmh-generator-annprocess:1.35'
testImplementation 'org.openjdk.jol:jol-core:0.10'
}
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
it.options.release.set(17)
}
java {
withSourcesJar()
}
jar {
manifest {
attributes(
"Specification-Title": project.name,
"Specification-Vendor": "BloCamLimb",
"Specification-Version": "1",
"Implementation-Title": project.name,
"Implementation-Version": project.version,
"Implementation-Vendor": "BloCamLimb",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
)
}
}