File tree Expand file tree Collapse file tree 3 files changed +19
-29
lines changed Expand file tree Collapse file tree 3 files changed +19
-29
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,21 @@ kotlin {
3838 js()
3939
4040
41+
4142 @OptIn(ExperimentalKotlinGradlePluginApi ::class )
43+ applyDefaultHierarchyTemplate {
44+ common {
45+ group(" composeUi" ) {
46+ withJvm()
47+ withAndroidTarget()
48+ group(" ios" )
49+ withWasmJs()
50+ }
51+ }
52+ }
53+
54+
55+
4256 compilerOptions {
4357 freeCompilerArgs.add(" -Xexpect-actual-classes" )
4458 }
Original file line number Diff line number Diff line change 1- import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
2-
31plugins {
42 id(" common-conventions" )
53 id(" com.huanshankeji.kotlin-multiplatform-conventional-targets" )
@@ -11,20 +9,6 @@ kotlin {
119 publishLibraryVariants(" release" , " debug" )
1210 }
1311
14- // move to `common-conventions` if necessary
15-
16- @OptIn(ExperimentalKotlinGradlePluginApi ::class )
17- applyDefaultHierarchyTemplate {
18- common {
19- group(" composeUi" ) {
20- withJvm()
21- withAndroidTarget()
22- group(" ios" )
23- withWasmJs()
24- }
25- }
26- }
27-
2812 /*
2913 sourceSets {
3014 val composeUiMain by creating { dependsOn(commonMain.get()) }
Original file line number Diff line number Diff line change @@ -57,30 +57,22 @@ kotlin {
5757 implementation(commonDependencies.kotlinx.coroutines.core())
5858 }
5959 }
60+ composeUiMain {
61+ dependencies {
62+ implementation(compose.ui)
63+ }
64+ }
6065 jvmMain {
6166 dependencies {
6267 implementation(compose.desktop.currentOs)
6368 }
6469 }
6570 androidMain {
6671 dependencies {
67- // TODO consider putting this in `composeUiMain`
68- implementation(compose.ui)
69-
7072 implementation(commonDependencies.androidx.activity.compose())
7173 implementation(commonDependencies.androidx.compose.ui.module(" tooling-preview" ))
7274 }
7375 }
74- iosMain {
75- dependencies {
76- implementation(compose.ui)
77- }
78- }
79- wasmJsMain {
80- dependencies {
81- implementation(compose.ui)
82- }
83- }
8476 jsMain {
8577 dependencies {
8678 implementation(compose.html.core)
You can’t perform that action at this time.
0 commit comments