Skip to content

Commit

Permalink
Refactor Assimp natives dependency declarations.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ThePandaOliver committed Dec 15, 2024
1 parent d613eed commit 2b8c19d
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -105,22 +105,16 @@ subprojects {
parchment("org.parchmentmc.data:parchment-${properties["parchment_minecraft_version"]}:${properties["parchment_version"]}@zip")
})

// Assimp Library

"jarShadow"("org.lwjgl:lwjgl-assimp:${properties["deps_lwjgl_version"]}") {
exclude(group = "org.lwjgl", module = "lwjgl")
}

if (isMinecraftSubProject) {
// Assimp natives
"jarShadow"("org.lwjgl:lwjgl-assimp:${properties["deps_lwjgl_version"]}:natives-windows") {
exclude(group = "org.lwjgl", module = "lwjgl")
}

"jarShadow"("org.lwjgl:lwjgl-assimp:${properties["deps_lwjgl_version"]}:natives-linux") {
exclude(group = "org.lwjgl", module = "lwjgl")
}

"jarShadow"("org.lwjgl:lwjgl-assimp:${properties["deps_lwjgl_version"]}:natives-macos") {
exclude(group = "org.lwjgl", module = "lwjgl")
for (natives in arrayOf("natives-windows", "natives-linux", "natives-macos")) {
"jarShadow"("org.lwjgl:lwjgl-assimp:${properties["deps_lwjgl_version"]}:${natives}") {
exclude(group = "org.lwjgl", module = "lwjgl")
}
}
}

Expand Down

0 comments on commit 2b8c19d

Please sign in to comment.