Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
philipp94831 committed Feb 28, 2024
1 parent ceb9a48 commit 525ac68
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions sonatype/src/main/kotlin/com/bakdata/gradle/SonatypePlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -221,16 +221,15 @@ class SonatypePlugin : Plugin<Project> {
apply(plugin = "signing")
apply(plugin = "org.gradle.maven-publish")

project.tasks.matching { it.name == "dokkaJavadoc" }.all {
val javadocTask: Task = this
val main: SourceSet = the<JavaPluginExtension>().sourceSets.getByName(SourceSet.MAIN_SOURCE_SET_NAME)
tasks.create<Jar>(main.javadocJarTaskName) {
archiveClassifier.set(JAVADOC)
from(javadocTask)
project.plugins.matching { it is JavaPlugin }.all {
project.tasks.matching { it.name == "dokka" }.all {
val javadocTask: Task = this
tasks.create<Jar>("javadocJar") {
archiveClassifier.set(JAVADOC)
from(javadocTask)
}
}
}

project.plugins.matching { it is JavaPlugin }.all {
configure<JavaPluginExtension> {
withSourcesJar()
withJavadocJar()
Expand Down

0 comments on commit 525ac68

Please sign in to comment.