Skip to content

Commit 1cdbe8d

Browse files
committed
Migrate to newer Nexus publishing Gradle plugin
1 parent 0480608 commit 1cdbe8d

File tree

2 files changed

+12
-29
lines changed

2 files changed

+12
-29
lines changed

build.gradle

Lines changed: 10 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ buildscript {
1111
plugins {
1212
id 'java-platform'
1313
id 'com.github.kt3k.coveralls' version '2.12.0'
14-
id 'io.codearte.nexus-staging' version '0.30.0'
14+
id 'io.github.gradle-nexus.publish-plugin' version '1.1.0'
1515
id 'io.franzbecker.gradle-lombok' version '4.0.0'
1616
}
1717

@@ -27,10 +27,15 @@ project.ext.publishEnabled = !isCiBuild &&
2727
project.hasProperty('ossrhUsername') && project.hasProperty('ossrhPassword')
2828

2929
if (publishEnabled) {
30-
nexusStaging {
31-
username = ossrhUsername
32-
password = ossrhPassword
33-
stagingProfileId = '6c61426e6529d'
30+
nexusPublishing {
31+
repositories {
32+
sonatype {
33+
stagingProfileId = '6c61426e6529d'
34+
35+
username = ossrhUsername
36+
password = ossrhPassword
37+
}
38+
}
3439
}
3540
}
3641

@@ -258,17 +263,6 @@ subprojects { project ->
258263
}
259264
}
260265
}
261-
262-
repositories {
263-
maven {
264-
name = "sonatypeNexus"
265-
url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
266-
credentials {
267-
username ossrhUsername
268-
password ossrhPassword
269-
}
270-
}
271-
}
272266
}
273267

274268
signing {
@@ -319,17 +313,6 @@ if (publishEnabled) {
319313
}
320314
}
321315
}
322-
323-
repositories {
324-
maven {
325-
name = "sonatypeNexus"
326-
url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
327-
credentials {
328-
username ossrhUsername
329-
password ossrhPassword
330-
}
331-
}
332-
}
333316
}
334317

335318
signing {

doc/releasing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Release candidate versions
2525
5. Publish to Sonatype Nexus:
2626
2727
```
28-
$ ./gradlew publish closeAndReleaseRepository
28+
$ ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
2929
```
3030
3131
6. Wait for the artifacts to become downloadable at
@@ -112,7 +112,7 @@ Release versions
112112
9. Publish to Sonatype Nexus:
113113
114114
```
115-
$ ./gradlew publish closeAndReleaseRepository
115+
$ ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
116116
```
117117
118118
10. Wait for the artifacts to become downloadable at

0 commit comments

Comments
 (0)