diff --git a/src/main/kotlin/space/kscience/gradle/internal/publishing.kt b/src/main/kotlin/space/kscience/gradle/internal/publishing.kt index 969bc79..f0d15c3 100644 --- a/src/main/kotlin/space/kscience/gradle/internal/publishing.kt +++ b/src/main/kotlin/space/kscience/gradle/internal/publishing.kt @@ -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 { - 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 { + artifact(dokkaJar) + } + } + if (requestPropertyOrNull("publishing.signing.id") != null || requestPropertyOrNull("signing.gnupg.keyName") != null) { if (!plugins.hasPlugin("signing")) {