Skip to content

Commit

Permalink
Disable KMP C Interop metadata task when generating docs
Browse files Browse the repository at this point in the history
Workaround for Kotlin/dokka#2977.
  • Loading branch information
chrisbanes committed Apr 25, 2023
1 parent b73476e commit 48a46af
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,21 @@ allprojects {
}
}

// 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 {
def hasDokkaTasks = gradle.taskGraph.allTasks.any {
it instanceof org.jetbrains.dokka.gradle.AbstractDokkaTask
}
if (hasDokkaTasks) {
tasks.withType(
org.jetbrains.kotlin.gradle.targets.native.internal.CInteropMetadataDependencyTransformationTask
).configureEach {
enabled = false
}
}
}

// Disable the release linking tasks because we never need it for iOS sample applications.
// TODO Switch to https://youtrack.jetbrains.com/issue/KT-54424 when it is supported.
plugins.withId('org.jetbrains.kotlin.multiplatform') {
Expand Down

0 comments on commit 48a46af

Please sign in to comment.