Skip to content

Commit

Permalink
Fix: Maven Central upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Rolf-Smit committed Apr 11, 2024
1 parent 112af45 commit 95c3234
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions plugin/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import com.vanniktech.maven.publish.GradlePlugin
import com.vanniktech.maven.publish.JavadocJar
import com.vanniktech.maven.publish.SonatypeHost

plugins {
// Core Gradle plugins
id "java-gradle-plugin"
Expand Down Expand Up @@ -34,11 +38,15 @@ jacocoTestReport {
}
}

plugins.withId("com.vanniktech.maven.publish") {
mavenPublishing {
publishToMavenCentral("S01")
signAllPublications()
}
mavenPublishing {
// Override default configuration: by default `com.vanniktech.maven.publish` uses
// `new GradlePublishPlugin()` because it detects that we use `com.gradle.plugin-publish`.
// However since we also publish to Maven Central the default publication created by
// `com.gradle.plugin-publish` is not suitable (Maven Central publication requires sources
// and Javadoc).
configure(new GradlePlugin(new JavadocJar.Dokka("dokkaHtml")))
publishToMavenCentral(SonatypeHost.S01)
signAllPublications()
}

gradlePlugin {
Expand Down

0 comments on commit 95c3234

Please sign in to comment.