diff --git a/buildSrc/src/main/kotlin/base-convention.gradle.kts b/buildSrc/src/main/kotlin/base-convention.gradle.kts index 3370be3ba..381073551 100644 --- a/buildSrc/src/main/kotlin/base-convention.gradle.kts +++ b/buildSrc/src/main/kotlin/base-convention.gradle.kts @@ -1,4 +1,3 @@ -import org.gradle.accessors.dm.LibrariesForLibs import org.gradle.configurationcache.extensions.capitalized import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget import org.jetbrains.kotlin.gradle.targets.native.tasks.KotlinNativeSimulatorTest diff --git a/buildSrc/src/main/kotlin/library-convention.gradle.kts b/buildSrc/src/main/kotlin/library-convention.gradle.kts index 2e80c4c09..fd8823d4d 100644 --- a/buildSrc/src/main/kotlin/library-convention.gradle.kts +++ b/buildSrc/src/main/kotlin/library-convention.gradle.kts @@ -1,9 +1,6 @@ -@file:Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") - import org.jetbrains.dokka.gradle.AbstractDokkaTask import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi import org.jetbrains.kotlin.gradle.plugin.KotlinTargetHierarchy.SourceSetTree -import org.jetbrains.kotlin.gradle.targets.native.internal.CInteropMetadataDependencyTransformationTask plugins { id("base-convention") @@ -42,21 +39,11 @@ publishing.publications.withType { } // Workaround for https://github.com/Kotlin/dokka/issues/2977. -// We disable the C Interop IDE metadata task when generating documentation using Dokka. -gradle.taskGraph.whenReady { - val hasDokkaTasks = allTasks.any { - it is AbstractDokkaTask - } - if (hasDokkaTasks) { - tasks.withType().configureEach { - enabled = false - } +tasks.withType { + val className = "org.jetbrains.kotlin.gradle.targets.native.internal.CInteropMetadataDependencyTransformationTask" + @Suppress("UNCHECKED_CAST") + val taskClass = Class.forName(className) as Class + parent?.subprojects?.forEach { + dependsOn(it.tasks.withType(taskClass)) } } - -// TODO: Report this if it's still a bug in 1.9.0-RC -// Note in Kotlin 1.9.0-Beta-152 (1.8.21 works without this) -// transformCommonMainDependenciesMetadata needs to be run first before publishToMavenLocal -// and even still, paging modules are missing a file generated in other modules -// build/kotlinTransformedCInteropMetadataLibraries/iosMain/.couchbase-lite-paging-iosMain.cinteropLibraries -// copy from ktx modules and fix file path, then publishToMavenLocal will succeed diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index a22e3c8e3..fefd8fbc9 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -8,7 +8,7 @@ mockk = "1.13.3" # 1.13.4 breaks QueryExtensionKtTest on Android https://github. [plugins] android-library = { id = "com.android.library", version = "7.4.2" } dokka = { id = "org.jetbrains.dokka", version = "1.8.10" } -kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version = "1.9.0-RC-238" } +kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version = "1.9.0-RC-243" } [libraries] androidx-lifecycle-runtime-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version = "2.6.1" }