Skip to content

Commit

Permalink
Add skiko-awt-runtime dependency
Browse files Browse the repository at this point in the history
Co-authored-by: merati22 <[email protected]>
Co-authored-by: Mahdi Hosseinzadeh <[email protected]>

Fixes #3
  • Loading branch information
Merati22 authored and mahozad committed Jul 18, 2024
1 parent c39800e commit fc4cf90
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion library/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,23 @@ kotlin {
val desktopMain by getting {
dependencies {
// api(libs.androidx.ui.desktop)
// implementation("org.jetbrains.skiko:skiko-awt-runtime-windows-x64:0.7.92")
// See https://github.com/JetBrains/compose-multiplatform/blob/master/gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/internal/utils/osUtils.kt
val osName = System.getProperty("os.name")
val osArch = System.getProperty("os.arch")
val targetOs = when {
osName.equals("Mac OS X", ignoreCase = true) -> "macos"
osName.startsWith("Linux", ignoreCase = true) -> "linux"
osName.startsWith("Win", ignoreCase = true) -> "windows"
else -> error("Unsupported OS: $osName")
}
val targetArch = when (osArch) {
"x86_64", "amd64" -> "x64"
"aarch64" -> "arm64"
else -> error("Unsupported architecture: $osArch")
}
val target = "${targetOs}-${targetArch}"
val version = libs.versions.skiko.get()
implementation("org.jetbrains.skiko:skiko-awt-runtime-$target:$version")
}
}
val desktopTest by getting {
Expand Down

0 comments on commit fc4cf90

Please sign in to comment.