Skip to content

Commit a58f404

Browse files
committed
feat: migrate from OSSRH to central repository
1 parent 1bb4ecf commit a58f404

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

scripts/publish.gradle

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,7 @@ java {
1010
}
1111

1212
publishing {
13-
repositories {
14-
maven {
15-
name = "sonatype"
16-
def releaseUrl = "https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/"
17-
def snapshotUrl = "https://central.sonatype.com/repository/maven-snapshots/"
18-
url = version.endsWith('-SNAPSHOT') ? snapshotUrl : releaseUrl
19-
credentials {
20-
username = rootProject.ext["ossrhUsername"]
21-
password = rootProject.ext["ossrhPassword"]
22-
}
23-
}
24-
}
13+
// Remove the repositories block - it's handled by nexus-publish-plugin in setup.gradle
2514
publications {
2615
mavenJava(MavenPublication) {
2716
from components.java

scripts/setup.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
ext["signing.keyId"] = ''
33
ext["signing.password"] = ''
44
ext["signing.secretKeyRingFile"] = ''
5+
// NOTE: These should be Central Portal User Tokens, not OSSRH tokens
6+
// Generate tokens at: https://central.sonatype.com/account
57
ext["ossrhUsername"] = ''
68
ext["ossrhPassword"] = ''
79
ext["sonatypeStagingProfileId"] = ''
@@ -22,7 +24,7 @@ ext["signing.keyId"] = System.getenv('SIGNING_KEY_ID') ?: ext["signing.keyId"]
2224
ext["signing.password"] = System.getenv('SIGNING_PASSWORD') ?: ext["signing.password"]
2325
ext["signing.secretKeyRingFile"] = System.getenv('SIGNING_SECRET_KEY_RING_FILE') ?: ext["signing.secretKeyRingFile"]
2426

25-
// Set up Sonatype repository
27+
// Set up Sonatype repository using OSSRH Staging API
2628
nexusPublishing {
2729
repositories {
2830
sonatype {

0 commit comments

Comments
 (0)