Skip to content

Commit

Permalink
Migrate to newer Nexus publishing Gradle plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
emlun committed May 10, 2021
1 parent 0480608 commit 1cdbe8d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 29 deletions.
37 changes: 10 additions & 27 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ buildscript {
plugins {
id 'java-platform'
id 'com.github.kt3k.coveralls' version '2.12.0'
id 'io.codearte.nexus-staging' version '0.30.0'
id 'io.github.gradle-nexus.publish-plugin' version '1.1.0'
id 'io.franzbecker.gradle-lombok' version '4.0.0'
}

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

if (publishEnabled) {
nexusStaging {
username = ossrhUsername
password = ossrhPassword
stagingProfileId = '6c61426e6529d'
nexusPublishing {
repositories {
sonatype {
stagingProfileId = '6c61426e6529d'

username = ossrhUsername
password = ossrhPassword
}
}
}
}

Expand Down Expand Up @@ -258,17 +263,6 @@ subprojects { project ->
}
}
}

repositories {
maven {
name = "sonatypeNexus"
url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
credentials {
username ossrhUsername
password ossrhPassword
}
}
}
}

signing {
Expand Down Expand Up @@ -319,17 +313,6 @@ if (publishEnabled) {
}
}
}

repositories {
maven {
name = "sonatypeNexus"
url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
credentials {
username ossrhUsername
password ossrhPassword
}
}
}
}

signing {
Expand Down
4 changes: 2 additions & 2 deletions doc/releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Release candidate versions
5. Publish to Sonatype Nexus:
```
$ ./gradlew publish closeAndReleaseRepository
$ ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
```
6. Wait for the artifacts to become downloadable at
Expand Down Expand Up @@ -112,7 +112,7 @@ Release versions
9. Publish to Sonatype Nexus:
```
$ ./gradlew publish closeAndReleaseRepository
$ ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
```
10. Wait for the artifacts to become downloadable at
Expand Down

0 comments on commit 1cdbe8d

Please sign in to comment.