Skip to content

Commit 244649f

Browse files
committed
Fixup MVN URL's
1 parent 00df724 commit 244649f

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

gradle/publishing.gradle

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,17 @@ afterEvaluate {
6666
}
6767

6868
if (project.hasProperty("ossrhUsername") && project.hasProperty("ossrhPassword")) {
69+
def snapshotRepositoryUrl = 'https://central.sonatype.com/repository/maven-snapshots/'
70+
def releaseRepositoryUrl = 'https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/'
71+
def stagingServerUrl = 'https://ossrh-staging-api.central.sonatype.com/service/local/'
72+
6973
publishing {
7074
repositories {
7175
maven {
7276
name = 'sonatype'
7377
url = uri(project.version.toString().endsWith('-SNAPSHOT')
74-
? 'https://oss.sonatype.org/content/repositories/snapshots/'
75-
: 'https://oss.sonatype.org/service/local/staging/deploy/maven2/')
78+
? snapshotRepositoryUrl
79+
: releaseRepositoryUrl)
7680
credentials {
7781
username = project.property("ossrhUsername")
7882
password = project.property("ossrhPassword")
@@ -82,6 +86,7 @@ if (project.hasProperty("ossrhUsername") && project.hasProperty("ossrhPassword")
8286
}
8387

8488
nexusStaging {
89+
serverUrl stagingServerUrl
8590
username project.property("ossrhUsername")
8691
password project.property("ossrhPassword")
8792
packageGroup 'io.github.codedabble-dev'

0 commit comments

Comments
 (0)