File tree Expand file tree Collapse file tree 1 file changed +10
-11
lines changed
Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Original file line number Diff line number Diff line change 1- import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType
1+ import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
22
33plugins {
44 alias(libs.plugins.kotlin.multiplatform)
@@ -48,22 +48,21 @@ kotlin {
4848 watchosX64()
4949 watchosSimulatorArm64()
5050
51+ @OptIn(ExperimentalKotlinGradlePluginApi ::class )
52+ applyDefaultHierarchyTemplate {
53+ group(" nonJvm" ) {
54+ withJs()
55+ withNative()
56+ withWasm()
57+ }
58+ }
59+
5160 sourceSets {
5261 commonTest {
5362 dependencies {
5463 implementation(kotlin(" test" ))
5564 }
5665 }
57-
58- val nonJvmMain by creating {
59- dependsOn(commonMain.get())
60- }
61- }
62-
63- targets.onEach {
64- if (it.platformType != KotlinPlatformType .jvm) {
65- it.compilations.getByName(" main" ).source(sourceSets.getByName(" nonJvmMain" ))
66- }
6766 }
6867}
6968
You can’t perform that action at this time.
0 commit comments