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 {