Skip to content

Commit d4682d9

Browse files
authored
Update the sonatype repos (#235)
1 parent 53e4ad6 commit d4682d9

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

build.gradle

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ repositories {
3939
mavenContent {
4040
snapshotsOnly()
4141
}
42-
url 'https://oss.sonatype.org/content/repositories/snapshots/'
42+
// see https://central.sonatype.org/publish/publish-portal-snapshots/#consuming-via-gradle
43+
url 'https://central.sonatype.com/repository/maven-snapshots/'
4344
}
4445
}
4546

@@ -75,7 +76,14 @@ nexusPublishing {
7576
password = "admin123"
7677
}
7778
} else {
79+
// see https://github.com/gradle-nexus/publish-plugin#publishing-to-maven-central-via-sonatype-central
80+
// For official documentation:
81+
// staging repo publishing https://central.sonatype.org/publish/publish-portal-ossrh-staging-api/#configuration
82+
// snapshot publishing https://central.sonatype.org/publish/publish-portal-snapshots/#publishing-via-other-methods
7883
sonatype {
84+
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
85+
snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/"))
86+
7987
username = System.getenv("SONATYPE_USERNAME")
8088
password = System.getenv("SONATYPE_PASSWORD")
8189
}

0 commit comments

Comments
 (0)