Fixed LWJGL natives switch

This commit is contained in:
JeremyStar™ 2024-10-15 03:38:35 +02:00
parent 6cd38377b2
commit 8a52e991fd
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D

View file

@ -127,7 +127,7 @@ publishing {
// Determine operating system and architecture // Determine operating system and architecture
switch (OperatingSystem.current()) { switch (OperatingSystem.current()) {
case OperatingSystem.LINUX -> { case OperatingSystem.LINUX:
project.dependencyLwjglNatives = "natives-linux" project.dependencyLwjglNatives = "natives-linux"
def osArch = System.getProperty("os.arch") def osArch = System.getProperty("os.arch")
if (osArch.startsWith("arm") || osArch.startsWith("aarch64")) if (osArch.startsWith("arm") || osArch.startsWith("aarch64"))
@ -136,14 +136,13 @@ switch (OperatingSystem.current()) {
project.dependencyLwjglNatives += "-ppc64le" project.dependencyLwjglNatives += "-ppc64le"
else if (osArch.startsWith("riscv")) else if (osArch.startsWith("riscv"))
project.dependencyLwjglNatives += "-riscv64" project.dependencyLwjglNatives += "-riscv64"
} case OperatingSystem.MAC_OS:
case OperatingSystem.MAC_OS -> project.dependencyLwjglNatives = System.getProperty("os.arch").startsWith("aarch64") ? "natives-macos-arm64" : "natives-macos" project.dependencyLwjglNatives = System.getProperty("os.arch").startsWith("aarch64") ? "natives-macos-arm64" : "natives-macos"
case OperatingSystem.WINDOWS -> { case OperatingSystem.WINDOWS:
def osArch = System.getProperty("os.arch") def osArch = System.getProperty("os.arch")
project.dependencyLwjglNatives = osArch.contains("64") project.dependencyLwjglNatives = osArch.contains("64")
? "natives-windows${osArch.startsWith("aarch64") ? "-arm64" : ""}" ? "natives-windows${osArch.startsWith("aarch64") ? "-arm64" : ""}"
: "natives-windows-x86" : "natives-windows-x86"
}
} }
// Fix delombok task // Fix delombok task