Skip to content

Commit

Permalink
squash classifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
sargunv committed Jan 5, 2025
1 parent 25d3f62 commit c29fd1a
Showing 1 changed file with 12 additions and 35 deletions.
47 changes: 12 additions & 35 deletions lib/maplibre-compose/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -73,41 +73,18 @@ kotlin {
implementation(libs.lwjgl.opengl)
implementation(libs.lwjgl.vulkan)

runtimeOnly(
project.dependencies.variantOf(libs.lwjgl.core) { classifier("natives-macos-arm64") }
)
runtimeOnly(
project.dependencies.variantOf(libs.lwjgl.opengl) { classifier("natives-macos-arm64") }
)
runtimeOnly(
project.dependencies.variantOf(libs.lwjgl.vulkan) { classifier("natives-macos-arm64") }
)

runtimeOnly(project.dependencies.variantOf(libs.lwjgl.core) { classifier("natives-macos") })
runtimeOnly(project.dependencies.variantOf(libs.lwjgl.opengl) { classifier("natives-macos") })
runtimeOnly(project.dependencies.variantOf(libs.lwjgl.vulkan) { classifier("natives-macos") })

runtimeOnly(
project.dependencies.variantOf(libs.lwjgl.core) { classifier("natives-linux-arm64") }
)
runtimeOnly(
project.dependencies.variantOf(libs.lwjgl.opengl) { classifier("natives-linux-arm64") }
)

runtimeOnly(project.dependencies.variantOf(libs.lwjgl.core) { classifier("natives-linux") })
runtimeOnly(project.dependencies.variantOf(libs.lwjgl.opengl) { classifier("natives-linux") })

runtimeOnly(
project.dependencies.variantOf(libs.lwjgl.core) { classifier("natives-windows-arm64") }
)
runtimeOnly(
project.dependencies.variantOf(libs.lwjgl.opengl) { classifier("natives-windows-arm64") }
)

runtimeOnly(project.dependencies.variantOf(libs.lwjgl.core) { classifier("natives-windows") })
runtimeOnly(
project.dependencies.variantOf(libs.lwjgl.opengl) { classifier("natives-windows") }
)
fun lwjglNatives(left: Set<String>, right: Set<String>) = buildList {
for (l in left) for (r in right) add("natives-$l$r")
}

lwjglNatives(setOf("linux", "macos", "windows"), setOf("", "-arm64")).forEach {
runtimeOnly(project.dependencies.variantOf(libs.lwjgl.core) { classifier(it) })
runtimeOnly(project.dependencies.variantOf(libs.lwjgl.opengl) { classifier(it) })
}

lwjglNatives(setOf("macos"), setOf("", "-arm64")).forEach {
runtimeOnly(project.dependencies.variantOf(libs.lwjgl.vulkan) { classifier(it) })
}
}

jsMain.dependencies {
Expand Down

0 comments on commit c29fd1a

Please sign in to comment.