Skip to content

Commit 9fd8ff6

Browse files
feat: update maven repositories
- Switch to Central Portal (Nexus 2 Staging API) for newer projects - Update release and snapshot repository URLs - Use environment variables for Maven central credentials
1 parent 843fca6 commit 9fd8ff6

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

build.gradle

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,9 @@ allprojects {
1313
apply plugin: 'jacoco'
1414

1515
repositories {
16-
jcenter()
17-
}
18-
19-
jacoco {
20-
toolVersion = '0.8.7'
16+
mavenCentral()
2117
}
18+
jacoco { toolVersion = '0.8.7' }
2219
}
2320

2421
allprojects {
@@ -48,7 +45,7 @@ configure(publishedProjects) {
4845
targetCompatibility = 1.8
4946

5047
repositories {
51-
jcenter()
48+
//jcenter()
5249
maven {
5350
url 'https://plugins.gradle.org/m2/'
5451
}
@@ -139,9 +136,9 @@ configure(publishedProjects) {
139136
}
140137
repositories {
141138
maven {
142-
// Switched to s01 host (required for newer / migrated projects)
143-
def releaseUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2"
144-
def snapshotUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots"
139+
// Central Portal (Nexus 2 Staging API via new host)
140+
def releaseUrl = "https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2"
141+
def snapshotUrl = "https://central.sonatype.com/repository/maven-snapshots/"
145142
url = isReleaseVersion ? releaseUrl : snapshotUrl
146143
credentials {
147144
username System.getenv('MAVEN_CENTRAL_USERNAME')
@@ -257,3 +254,4 @@ def customizePom(pom, title) {
257254
}
258255
}
259256
}
257+

0 commit comments

Comments
 (0)