Skip to content

Commit

Permalink
Use Gradle Nexus Publish Plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
philipp94831 committed Feb 26, 2024
1 parent 18e18f7 commit 78d8797
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -215,19 +215,14 @@ class SonatypePlugin : Plugin<Project> {
apply(plugin = "signing")
apply(plugin = "org.gradle.maven-publish")

val javadocJar by tasks.creating(Jar::class) {
archiveClassifier.set("javadoc")
from(tasks.findByName("javadoc") ?: tasks.findByName("dokka"))
}

configure<JavaPluginExtension> {
withSourcesJar()
withJavadocJar()
}

configure<PublishingExtension> {
publications.create<MavenPublication>("sonatype") {
from(components["java"])
artifact(javadocJar)
}
}

Expand Down

0 comments on commit 78d8797

Please sign in to comment.