Skip to content

Commit

Permalink
chore: fix dependencies between publishing tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
esensar committed Dec 24, 2024
1 parent 2f36e8e commit 607759f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
20 changes: 10 additions & 10 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,23 @@ allprojects {

subprojects {
afterEvaluate {
val dokkaHtml = tasks["dokkaHtml"]
tasks {
create<Jar>("javadocJar") {
dependsOn(dokkaHtml)
archiveClassifier.set("javadoc")
from(dokkaHtml)
}
}

configure<SigningExtension> {
isRequired = false
sign(extensions.getByType<PublishingExtension>().publications)
}

configure<PublishingExtension> {
publications.withType(MavenPublication::class) {
artifact(tasks["javadocJar"])
val publication = this
val dokkaHtml = tasks["dokkaGenerate"]
val javadocJar =
tasks.register<Jar>("${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")
Expand Down
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 607759f

Please sign in to comment.