Skip to content

Commit

Permalink
Introduce Automatic Staging publish in Central
Browse files Browse the repository at this point in the history
  • Loading branch information
MateuszZarembaMongoDB committed Mar 28, 2024
1 parent 31a4fb2 commit 2435bc1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ plugins {
id("net.ltgt.errorprone") version "3.0.1" apply false
id "org.sonarqube" version "4.2.1.3168"
id "jacoco"
id "io.github.gradle-nexus.publish-plugin" version "2.0.0-rc-2"
}

apply(plugin: "java-library");
Expand Down Expand Up @@ -184,16 +185,15 @@ publishing {
}
}
}
}

nexusPublishing {
repositories {
maven {
def releasesRepoUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl

credentials {
username = System.getenv("OSSRH_USERNAME")
password = System.getenv("OSSRH_PASSWORD")
}
sonatype { //only for users registered in Sonatype after 24 Feb 2021
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
username = System.getenv("OSSRH_USERNAME")
password = System.getenv("OSSRH_PASSWORD")
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version=2.0.2
version=2.0.3

0 comments on commit 2435bc1

Please sign in to comment.