From 607759f338056cd00a82baea59ddbdc8e775e571 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Tue, 24 Dec 2024 10:28:28 +0100 Subject: [PATCH] chore: fix dependencies between publishing tasks --- build.gradle.kts | 20 ++++++++++---------- gradle.properties | 2 ++ 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index baf2766..5da2b74 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -42,15 +42,6 @@ allprojects { subprojects { afterEvaluate { - val dokkaHtml = tasks["dokkaHtml"] - tasks { - create("javadocJar") { - dependsOn(dokkaHtml) - archiveClassifier.set("javadoc") - from(dokkaHtml) - } - } - configure { isRequired = false sign(extensions.getByType().publications) @@ -58,7 +49,16 @@ subprojects { configure { publications.withType(MavenPublication::class) { - artifact(tasks["javadocJar"]) + val publication = this + val dokkaHtml = tasks["dokkaGenerate"] + val javadocJar = + tasks.register("${publication.name}JavadocJar") { + dependsOn(dokkaHtml) + archiveClassifier.set("javadoc") + archiveBaseName.set("${archiveBaseName.get()}-${publication.name}") + from(dokkaHtml) + } + artifact(javadocJar) pom { name.set("Kotlinx Serialization MsgPack") description.set("MsgPack format support for kotlinx.serialization") diff --git a/gradle.properties b/gradle.properties index c23602d..be1bb93 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,6 +2,8 @@ kotlin.code.style=official kotlin.incremental.multiplatform=true kotlin.js.generate.executable.default=false kotlin.native.ignoreDisabledTargets=true +org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled +org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true org.gradle.vfs.watch=true org.gradle.parallel=true