Skip to content

Commit 2b8c19d

Browse files
Refactor Assimp natives dependency declarations.
Replaced repetitive Assimp natives dependency blocks with a loop for cleaner and more maintainable code. This change reduces redundancy and improves readability in the build script.
1 parent d613eed commit 2b8c19d

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

build.gradle.kts

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -105,22 +105,16 @@ subprojects {
105105
parchment("org.parchmentmc.data:parchment-${properties["parchment_minecraft_version"]}:${properties["parchment_version"]}@zip")
106106
})
107107

108-
// Assimp Library
108+
109109
"jarShadow"("org.lwjgl:lwjgl-assimp:${properties["deps_lwjgl_version"]}") {
110110
exclude(group = "org.lwjgl", module = "lwjgl")
111111
}
112+
112113
if (isMinecraftSubProject) {
113-
// Assimp natives
114-
"jarShadow"("org.lwjgl:lwjgl-assimp:${properties["deps_lwjgl_version"]}:natives-windows") {
115-
exclude(group = "org.lwjgl", module = "lwjgl")
116-
}
117-
118-
"jarShadow"("org.lwjgl:lwjgl-assimp:${properties["deps_lwjgl_version"]}:natives-linux") {
119-
exclude(group = "org.lwjgl", module = "lwjgl")
120-
}
121-
122-
"jarShadow"("org.lwjgl:lwjgl-assimp:${properties["deps_lwjgl_version"]}:natives-macos") {
123-
exclude(group = "org.lwjgl", module = "lwjgl")
114+
for (natives in arrayOf("natives-windows", "natives-linux", "natives-macos")) {
115+
"jarShadow"("org.lwjgl:lwjgl-assimp:${properties["deps_lwjgl_version"]}:${natives}") {
116+
exclude(group = "org.lwjgl", module = "lwjgl")
117+
}
124118
}
125119
}
126120

0 commit comments

Comments
 (0)