diff --git a/compose/build.gradle.kts b/compose/build.gradle.kts index d71dffdc..7ee975b1 100644 --- a/compose/build.gradle.kts +++ b/compose/build.gradle.kts @@ -1,5 +1,3 @@ -import org.jetbrains.compose.compose - plugins { id("com.android.library") kotlin("multiplatform") @@ -15,9 +13,15 @@ kotlin { jvmToolchain(libs.versions.jvm.toolchain.get().toInt()) androidTarget().publishAllLibraryVariants() + iosArm64() + iosSimulatorArm64() + iosX64() jvm("desktop") sourceSets { + + applyDefaultHierarchyTemplate() + commonMain.dependencies { api(projects.kanvas) api(projects.element) @@ -29,8 +33,17 @@ kotlin { commonTest.dependencies { implementation(kotlin("test")) } - getByName("desktopMain").dependencies { - api(compose.preview) + + val skiaMain by creating { + dependsOn(commonMain.get()) + } + + val desktopMain by getting { + dependsOn(skiaMain) + } + + val iosMain by getting { + dependsOn(skiaMain) } } } diff --git a/compose/src/desktopMain/kotlin/DrawText.kt b/compose/src/skiaMain/kotlin/DrawText.kt similarity index 100% rename from compose/src/desktopMain/kotlin/DrawText.kt rename to compose/src/skiaMain/kotlin/DrawText.kt diff --git a/compose/src/desktopMain/kotlin/ResourceCache.kt b/compose/src/skiaMain/kotlin/ResourceCache.kt similarity index 100% rename from compose/src/desktopMain/kotlin/ResourceCache.kt rename to compose/src/skiaMain/kotlin/ResourceCache.kt diff --git a/compose/src/desktopMain/kotlin/SkiaIsPointInPath.kt b/compose/src/skiaMain/kotlin/SkiaIsPointInPath.kt similarity index 100% rename from compose/src/desktopMain/kotlin/SkiaIsPointInPath.kt rename to compose/src/skiaMain/kotlin/SkiaIsPointInPath.kt