From c29fd1a261a74dfc09ca766b58f1ebf795660aa3 Mon Sep 17 00:00:00 2001 From: Sargun Vohra Date: Sat, 4 Jan 2025 17:58:47 -0800 Subject: [PATCH] squash classifiers --- lib/maplibre-compose/build.gradle.kts | 47 +++++++-------------------- 1 file changed, 12 insertions(+), 35 deletions(-) diff --git a/lib/maplibre-compose/build.gradle.kts b/lib/maplibre-compose/build.gradle.kts index f0a25895..43acb6ca 100644 --- a/lib/maplibre-compose/build.gradle.kts +++ b/lib/maplibre-compose/build.gradle.kts @@ -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, right: Set) = 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 {