Skip to content

Commit 7dce8fd

Browse files
authored
Merge pull request #31 from cketti/update-build-config
Clean up source set configuration
2 parents 947a96d + f0b924d commit 7dce8fd

File tree

3 files changed

+14
-15
lines changed

3 files changed

+14
-15
lines changed

kotlin-codepoints-deluxe/build.gradle.kts

+3-2
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,13 @@ kotlin {
4747
watchosSimulatorArm64()
4848

4949
sourceSets {
50-
val commonMain by getting {
50+
commonMain {
5151
dependencies {
5252
api(project(":kotlin-codepoints"))
5353
}
5454
}
55-
val commonTest by getting {
55+
56+
commonTest {
5657
dependencies {
5758
implementation(kotlin("test"))
5859
}

kotlin-codepoints/build.gradle.kts

+11-13
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType
1+
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
22

33
plugins {
44
alias(libs.plugins.kotlin.multiplatform)
@@ -48,23 +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 {
52-
val commonMain by getting
53-
val commonTest by getting {
61+
commonTest {
5462
dependencies {
5563
implementation(kotlin("test"))
5664
}
5765
}
58-
59-
val commonImplementation by creating {
60-
dependsOn(commonMain)
61-
}
62-
}
63-
64-
targets.onEach {
65-
if (it.platformType != KotlinPlatformType.jvm) {
66-
it.compilations.getByName("main").source(sourceSets.getByName("commonImplementation"))
67-
}
6866
}
6967
}
7068

0 commit comments

Comments
 (0)