Fix dokka publishing

This commit is contained in:
Alexander Nozik 2023-03-12 12:58:50 +03:00
parent e535fdc6f5
commit b7c0d808b7

View File

@ -63,16 +63,8 @@ internal fun Project.setupPublication(mavenPomConfiguration: MavenPom.() -> Unit
}
}
val dokkaJar by tasks.creating(Jar::class) {
group = "documentation"
archiveClassifier.set("javadoc")
from(tasks.findByName("dokkaHtml"))
}
// Process each publication we have in this project
publications.withType<MavenPublication> {
artifact(dokkaJar)
pom {
name.set(project.name)
description.set(project.description ?: project.name)
@ -85,6 +77,17 @@ internal fun Project.setupPublication(mavenPomConfiguration: MavenPom.() -> Unit
}
}
plugins.withId("org.jetbrains.dokka") {
val dokkaJar by tasks.creating(Jar::class) {
group = "documentation"
archiveClassifier.set("javadoc")
from(tasks.findByName("dokkaHtml"))
}
publications.withType<MavenPublication> {
artifact(dokkaJar)
}
}
if (requestPropertyOrNull("publishing.signing.id") != null || requestPropertyOrNull("signing.gnupg.keyName") != null) {
if (!plugins.hasPlugin("signing")) {