Skip to content

Commit

Permalink
Fix release pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
erksch committed Jul 5, 2024
1 parent e0384cc commit 2358ef5
Showing 1 changed file with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,25 @@ tasks {
val deleteDokkaOutputDir by registering(Delete::class) {
delete(dokkaOutputDir)
}

register<Jar>("javadocJar") {
dependsOn(deleteDokkaOutputDir, dokkaHtml)
archiveClassifier.set("javadoc")
from(dokkaOutputDir)
}
}

publishing {
// Configure all publications
publications.withType<MavenPublication> {

artifact(tasks.named<Jar>("javadocJar").get())
val publication = this
val dokkaJar = tasks.register<Jar>("${publication.name}DokkaJar") {
group = JavaBasePlugin.DOCUMENTATION_GROUP
description = "Assembles Kotlin docs with Dokka into a Javadoc jar"
archiveClassifier.set("javadoc")
from(tasks.named("dokkaHtml"))
// Each archive name should be distinct, to avoid implicit dependency issues.
// We use the same format as the sources Jar tasks.
// https://youtrack.jetbrains.com/issue/KT-46466
archiveBaseName.set("${archiveBaseName.get()}-${publication.name}")
}

artifact(dokkaJar)

// Provide artifacts information requited by Maven Central
pom {
Expand Down

0 comments on commit 2358ef5

Please sign in to comment.