From 5063fcf5d822457120d82d5c41385b83ac34f9f3 Mon Sep 17 00:00:00 2001 From: Abdelilah El Aissaoui Date: Wed, 3 May 2023 15:13:20 +0200 Subject: [PATCH] Included ARM build for linux --- build.gradle.kts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index 0150d8d..ede81e2 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -29,6 +29,11 @@ dependencies { val jgit = "6.5.0.202303070854-r" implementation(compose.desktop.currentOs) + when (currentOs()) { + OS.LINUX -> implementation(compose.desktop.linux_arm64) // Include arm for linux builds + else -> {} + } + @OptIn(org.jetbrains.compose.ExperimentalComposeLibrary::class) implementation(compose.desktop.components.splitPane) implementation(compose("org.jetbrains.compose.ui:ui-util")) @@ -52,6 +57,22 @@ dependencies { } +fun currentOs(): OS { + val os = System.getProperty("os.name") + return when { + os.equals("Mac OS X", ignoreCase = true) -> OS.MAC + os.startsWith("Win", ignoreCase = true) -> OS.WINDOWS + os.startsWith("Linux", ignoreCase = true) -> OS.LINUX + else -> error("Unknown OS name: $os") + } +} + +enum class OS { + LINUX, + WINDOWS, + MAC +} + tasks.test { useJUnitPlatform() testLogging {