Skip to content

Commit

Permalink
Switch to io.github.gradle-nexus.publish-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Larusso committed May 5, 2021
1 parent 56a325f commit 473fd82
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ plugins {
id 'jacoco'
id 'com.github.kt3k.coveralls' version '2.8.2'
id 'io.codearte.nexus-staging' version '0.30.0'
id "de.marcphilipp.nexus-publish" version "0.4.0"
id "io.github.gradle-nexus.publish-plugin" version "1.0.0"
}

group "com.wooga.github"
Expand Down Expand Up @@ -124,16 +124,13 @@ publishing {

nexusPublishing {
repositories {
sonatype()
sonatype {
username = project.hasProperty('ossrhUsername') ? project.property('ossrhUsername') : System.getenv('OSSRH_USERNAME')
password = project.hasProperty('ossrhPassword') ? project.property('ossrhPassword') : System.getenv('OSSRH_PASSWORD')
}
}
}

nexusStaging {
username = project.hasProperty('ossrhUsername') ? project.property('ossrhUsername') : System.getenv('OSSRH_USERNAME')
password = project.hasProperty('ossrhPassword') ? project.property('ossrhPassword') : System.getenv('OSSRH_PASSWORD')
packageGroup = "com.wooga"
}

signing {
def signingKeyId = project.hasProperty("signingKeyId") ? project.property('signingKeyId') : System.getenv('OSSRH_SIGNING_KEY_ID')
def signingKey = project.hasProperty("signingKey") ? project.property('signingKey') : System.getenv('OSSRH_SIGNING_KEY')
Expand All @@ -143,7 +140,11 @@ signing {
}

postRelease.dependsOn(tasks.publish)
tasks."final".dependsOn(tasks.closeAndReleaseRepository)
tasks."candidate".dependsOn(tasks.closeAndReleaseRepository)
tasks.closeAndReleaseRepository.mustRunAfter(tasks.postRelease)
tasks.publish.mustRunAfter(tasks.release)

afterEvaluate {
tasks."final".dependsOn(tasks.publishToSonatype, tasks.closeAndReleaseSonatypeStagingRepository)
tasks."candidate".dependsOn(tasks.publishToSonatype, tasks.closeAndReleaseSonatypeStagingRepository)
tasks.publishToSonatype.mustRunAfter(tasks.postRelease)
tasks.closeSonatypeStagingRepository.mustRunAfter(tasks.publishToSonatype)
tasks.publish.mustRunAfter(tasks.release)
}

0 comments on commit 473fd82

Please sign in to comment.