Skip to content

Commit

Permalink
Apply 'io.github.gradle-nexus.publish-plugin' plugin to restore publi…
Browse files Browse the repository at this point in the history
…sh...Sonatype tasks

Remove unnecessary 'io.codearte.nexus-staging' gradle plugin

Place nexusPublishing config at the bottom of build script
  • Loading branch information
abelsromero committed Dec 23, 2021
1 parent 3b00d3d commit 6620d3d
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,10 @@ buildscript {
// modern plugins config
plugins {
id "signing"
id "io.codearte.nexus-staging" version "0.22.0"
id "io.github.gradle-nexus.publish-plugin" version "1.1.0"
id 'com.github.jruby-gradle.base' version '2.0.0'
}

apply plugin: 'io.codearte.nexus-staging'


nexusStaging {
if (project.hasProperty("sonatypeUsername")) {
username = project.sonatypeUsername
}
if (project.hasProperty("sonatypePassword")) {
password = project.sonatypePassword
}
repositoryDescription = "Release ${project.group} ${project.version}"
}

// TIP use -PpublishRelease=true to active release behavior regardless of the version
status = project.hasProperty('publishRelease') && project.publishRelease.toBoolean() ?
'release' : ((version == 'unspecified' || version.endsWith('-SNAPSHOT')) ? 'snapshot' : 'release')
Expand Down Expand Up @@ -195,3 +182,18 @@ configure(subprojects.findAll { it.name != 'itest'}) {
// IMPORTANT The TMP or TEMP environment variable must be set for the gem install command to work on Windows
processResources.dependsOn jrubyPrepare
}

nexusPublishing {
repositories {
sonatype {
if (project.hasProperty("sonatypeUsername")) {
username = project.sonatypeUsername
}
if (project.hasProperty("sonatypePassword")) {
password = project.sonatypePassword
}
repositoryDescription = "Release ${project.group} ${project.version}"
}
}
clientTimeout = Duration.ofMinutes(5)
}

0 comments on commit 6620d3d

Please sign in to comment.