@@ -7,8 +7,8 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
77 * composable.
88 *
99 * A separate module so that `:python-multiplatform` itself never depends on Compose (same naming as
10- * `-ksp` and `-gradle-plugin`). JVM targets first -- desktop and Android share the code, which is all
11- * in `commonMain`; iOS and wasm come later.
10+ * `-ksp` and `-gradle-plugin`). Desktop JVM, Android and Kotlin/Native desktop (macosArm64, linuxX64)
11+ * share the code, which is all in `commonMain`; iOS and wasm come later.
1212 */
1313plugins {
1414 alias(libs.plugins.kotlin.multiplatform)
@@ -35,13 +35,26 @@ kotlin {
3535 }
3636 }
3737
38+ // Kotlin/Native desktop (#191 Phase B, #386), the targets `:python-multiplatform` has since #370.
39+ // Upstream JetBrains Compose publishes no `ui` klib for linuxX64; the fork this repository builds
40+ // on publishes `runtime`, `runtime-saveable` and `ui` for both targets.
41+ macosArm64()
42+ linuxX64()
43+
3844 sourceSets {
3945 commonMain.dependencies {
4046 api(projects.pythonMultiplatform)
4147 api(compose.runtime)
4248 api(compose.ui)
4349 api(compose.runtimeSaveable)
4450 }
51+ // Same shape as the library's: commonMain -> desktopNativeMain -> {macosArm64Main, linuxX64Main}.
52+ // Empty today (the host is all commonMain); it is where K/N-desktop-only host code goes.
53+ val desktopNativeMain by creating {
54+ dependsOn(commonMain.get())
55+ }
56+ getByName(" macosArm64Main" ).dependsOn(desktopNativeMain)
57+ getByName(" linuxX64Main" ).dependsOn(desktopNativeMain)
4558 }
4659}
4760
0 commit comments