Skip to content

Commit 9495631

Browse files
committed
chore: update Sonatype repository URLs to use OSSRH Staging API
1 parent 8eace11 commit 9495631

File tree

3 files changed

+5
-17
lines changed

3 files changed

+5
-17
lines changed

templates/android/scripts/publish-config.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ nexusPublishing {
3030
stagingProfileId = sonatypeStagingProfileId
3131
username = ossrhUsername
3232
password = ossrhPassword
33-
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
34-
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
33+
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
34+
snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/"))
3535
}
3636
}
3737
}

templates/kotlin/scripts/publish.gradle

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,6 @@ java {
1010
}
1111

1212
publishing {
13-
repositories {
14-
maven {
15-
name = "sonatype"
16-
def releaseUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
17-
def snapshotUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
18-
url = version.endsWith('-SNAPSHOT') ? snapshotUrl : releaseUrl
19-
credentials {
20-
username = rootProject.ext["ossrhUsername"]
21-
password = rootProject.ext["ossrhPassword"]
22-
}
23-
}
24-
}
2513
publications {
2614
mavenJava(MavenPublication) {
2715
from components.java

templates/kotlin/scripts/setup.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ ext["signing.keyId"] = System.getenv('SIGNING_KEY_ID') ?: ext["signing.keyId"]
2222
ext["signing.password"] = System.getenv('SIGNING_PASSWORD') ?: ext["signing.password"]
2323
ext["signing.secretKeyRingFile"] = System.getenv('SIGNING_SECRET_KEY_RING_FILE') ?: ext["signing.secretKeyRingFile"]
2424

25-
// Set up Sonatype repository
25+
// Set up Sonatype repository using OSSRH Staging API
2626
nexusPublishing {
2727
repositories {
2828
sonatype {
2929
stagingProfileId = sonatypeStagingProfileId
3030
username = ossrhUsername
3131
password = ossrhPassword
32-
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
33-
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
32+
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
33+
snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/"))
3434
}
3535
}
3636
}

0 commit comments

Comments
 (0)