From 76e44e25c84ce30af12ba5c72877a65ac1066c68 Mon Sep 17 00:00:00 2001 From: Yang Date: Fri, 23 Feb 2024 23:01:27 +1100 Subject: [PATCH] Fix `nonJvm` and `jvmLincheck` sourcesets. --- build-logic/gradle.properties | 1 - .../buildlogic/convention/ConventionPlugin.kt | 19 ++++++++----------- cache4k/build.gradle.kts | 1 - gradle.properties | 1 - 4 files changed, 8 insertions(+), 14 deletions(-) diff --git a/build-logic/gradle.properties b/build-logic/gradle.properties index 771574b..917f4a3 100644 --- a/build-logic/gradle.properties +++ b/build-logic/gradle.properties @@ -5,4 +5,3 @@ org.gradle.configuration-cache=true org.gradle.configuration-cache.problems=warn kotlin.code.style=official -kotlin.experimental.tryK2=true diff --git a/build-logic/src/main/kotlin/io/github/reactivecircus/cache4k/buildlogic/convention/ConventionPlugin.kt b/build-logic/src/main/kotlin/io/github/reactivecircus/cache4k/buildlogic/convention/ConventionPlugin.kt index b19ffcc..4237d54 100644 --- a/build-logic/src/main/kotlin/io/github/reactivecircus/cache4k/buildlogic/convention/ConventionPlugin.kt +++ b/build-logic/src/main/kotlin/io/github/reactivecircus/cache4k/buildlogic/convention/ConventionPlugin.kt @@ -183,22 +183,19 @@ private fun KotlinMultiplatformExtension.configureTargets(project: Project) { applyDefaultHierarchyTemplate() sourceSets { - val jvmAndIos by creating { + val nonJvmMain by creating { dependsOn(commonMain.get()) } - iosMain.get().dependsOn(jvmAndIos) - jvmMain.get().dependsOn(jvmAndIos) - - val nonJvm by creating { - dependsOn(commonMain.get()) + val jvmLincheck by getting { + dependsOn(jvmMain.get()) } - jsMain.get().dependsOn(nonJvm) + jsMain.get().dependsOn(nonJvmMain) @Suppress("UnusedPrivateProperty") val wasmJsMain by getting { - dependsOn(nonJvm) + dependsOn(nonJvmMain) } - appleMain.get().dependsOn(nonJvm) - linuxMain.get().dependsOn(nonJvm) - mingwMain.get().dependsOn(nonJvm) + appleMain.get().dependsOn(nonJvmMain) + linuxMain.get().dependsOn(nonJvmMain) + mingwMain.get().dependsOn(nonJvmMain) } } diff --git a/cache4k/build.gradle.kts b/cache4k/build.gradle.kts index 4375875..d50fd2d 100644 --- a/cache4k/build.gradle.kts +++ b/cache4k/build.gradle.kts @@ -24,7 +24,6 @@ kotlin { } jvmLincheck { dependencies { - dependsOn(jvmMain) implementation(kotlin("test-junit5")) implementation(libs.lincheck) } diff --git a/gradle.properties b/gradle.properties index 6b111db..9600e9e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -18,4 +18,3 @@ org.gradle.configureondemand=true org.gradle.caching=true kotlin.code.style=official -kotlin.experimental.tryK2=false