1+ import org.jetbrains.compose.desktop.application.dsl.TargetFormat
12import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl
23import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackConfig
34
@@ -25,16 +26,32 @@ kotlin {
2526 }
2627 binaries.executable()
2728 }
28-
29+
30+ jvm(" desktop" )
31+
2932 sourceSets {
33+ val wasmJsMain by getting {
34+ dependencies {
35+ implementation(" io.ktor:ktor-client-js:3.0.0-beta-2" )
36+ }
37+ }
38+
39+ val desktopMain by getting {
40+ dependencies {
41+ implementation(compose.desktop.currentOs)
42+ implementation(libs.kotlinx.coroutines.swing)
43+ implementation(" io.ktor:ktor-client-cio:3.0.0-beta-2" )
44+ }
45+ }
46+
3047 commonMain.dependencies {
3148 implementation(compose.runtime)
3249 implementation(compose.foundation)
3350 implementation(compose.material)
3451 implementation(compose.ui)
3552 implementation(compose.components.resources)
3653 implementation(compose.components.uiToolingPreview)
37- implementation(" io.ktor:ktor-client-core:3.0.0-wasm2 " )
54+ implementation(" io.ktor:ktor-client-core:3.0.0-beta-2 " )
3855 implementation(" com.charleskorn.kaml:kaml:0.61.0" )
3956 }
4057 }
@@ -43,3 +60,14 @@ kotlin {
4360compose.experimental {
4461 web.application {}
4562}
63+ compose.desktop {
64+ application {
65+ mainClass = " MainKt"
66+
67+ nativeDistributions {
68+ targetFormats(TargetFormat .Dmg , TargetFormat .Msi , TargetFormat .Deb )
69+ packageName = " it.krzeminski.githubactionstypingeditor"
70+ packageVersion = " 1.0.0"
71+ }
72+ }
73+ }
0 commit comments