Skip to content

Commit 171f1a0

Browse files
committed
fix(client): bundle all luau natives so client jar runs on any host OS
1 parent df0fbca commit 171f1a0

1 file changed

Lines changed: 4 additions & 9 deletions

File tree

client-fabric/build.gradle

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,10 @@ dependencies {
6969

7070
if (luauEnabled.get()) {
7171
include implementation("dev.hollowcube:luau:${luauVersion.get()}")
72-
String luauOs = System.getProperty("os.name", "").toLowerCase(java.util.Locale.ROOT)
73-
String luauArch = System.getProperty("os.arch", "").toLowerCase(java.util.Locale.ROOT)
74-
String luauNative = null
75-
if ((luauArch == "amd64" || luauArch == "x86_64") && luauOs.contains("linux")) luauNative = "linux-x64"
76-
else if ((luauArch == "amd64" || luauArch == "x86_64") && luauOs.contains("win")) luauNative = "windows-x64"
77-
else if ((luauArch == "amd64" || luauArch == "x86_64") && luauOs.contains("mac")) luauNative = "macos-x64"
78-
else if ((luauArch == "aarch64" || luauArch == "arm64") && luauOs.contains("mac")) luauNative = "macos-arm64"
79-
if (luauNative != null) {
80-
include runtimeOnly("dev.hollowcube:luau-natives-${luauNative}:${luauVersion.get()}")
72+
// Bundle every supported Luau native so the client works on any host OS,
73+
// regardless of which platform builds the release jar.
74+
for (String variant : ['linux-x64', 'windows-x64', 'macos-x64', 'macos-arm64']) {
75+
include runtimeOnly("dev.hollowcube:luau-natives-${variant}:${luauVersion.get()}")
8176
}
8277
}
8378
}

0 commit comments

Comments
 (0)