Skip to content

Commit

Permalink
switch to publish plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
mmoayyed committed Oct 17, 2021
1 parent 5c8d8d8 commit 2cba0f0
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
26 changes: 17 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ buildscript {
classpath "gradle.plugin.com.github.spotbugs.snom:spotbugs-gradle-plugin:$gradleSpotbugsVersion"
classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:$gradleSonarqubeVersion"
classpath "com.github.jengelman.gradle.plugins:shadow:$gradleShadowVersion"
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:$gradleNexusStagingVersion"
classpath "de.marcphilipp.gradle:nexus-publish-plugin:$gradleNexusPublishingVersion"
classpath "io.github.gradle-nexus:publish-plugin:$gradleNexusPublishingVersion"
}
}

Expand Down Expand Up @@ -78,14 +77,23 @@ def isArtifactSigningRequired = {
return publishReleases && !skipArtifactSigning
}

apply plugin: "io.codearte.nexus-staging"
nexusStaging {
username = "${repositoryUsername}"
password = "${repositoryPassword}"
apply plugin: "io.github.gradle-nexus.publish-plugin"
nexusPublishing {
packageGroup = "org.apereo"
stagingProfileId = "11d1ddbbdeae9d"
numberOfRetries = 60
delayBetweenRetriesInMillis = 60000
repositories {
sonatype {
stagingProfileId = "11d1ddbbdeae9d"
username = "${repositoryUsername}"
password = "${repositoryPassword}"
}
}

clientTimeout = java.time.Duration.ofSeconds(120)
connectTimeout = java.time.Duration.ofSeconds(120)
transitionCheckOptions {
maxRetries.set(60)
delayBetween.set(java.time.Duration.ofMillis(60000))
}
}

apply from: rootProject.file("gradle/dependencies.gradle")
Expand Down
5 changes: 2 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Platform metadata for releases, POM generation, etc.
#################################################
group=org.apereo.cas
version=6.4.2-SNAPSHOT
version=6.4.2

projectUrl=https://www.apereo.org/cas
projectInceptionYear=2004
Expand Down Expand Up @@ -87,8 +87,7 @@ gradleErrorProneVersion=2.0.2
gradleJacocoVersion=0.8.7
gradleLicenseVersion=1.17
gradleShadowVersion=6.1.0
gradleNexusStagingVersion=0.30.0
gradleNexusPublishingVersion=0.4.0
gradleNexusPublishingVersion=1.1.0

###############################
# Javax Libs versions
Expand Down
2 changes: 1 addition & 1 deletion release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function build {

function publish {
echo -e "\n${GREEN}Publishing CAS. Please be patient as this might take a while...${NORMAL}\n"
./gradlew publish closeAndReleaseRepository --no-watch-fs -DpublishReleases=true -DrepositoryUsername="$1" -DrepositoryPassword="$2" \
./gradlew publishToSonatype closeAndReleaseStagingRepository --no-watch-fs -DpublishReleases=true -DrepositoryUsername="$1" -DrepositoryPassword="$2" \
-Dorg.gradle.internal.http.socketTimeout="${TIMEOUT}" -Dorg.gradle.internal.http.connectionTimeout="${TIMEOUT}" \
-Dorg.gradle.internal.publish.checksums.insecure=true
}
Expand Down

0 comments on commit 2cba0f0

Please sign in to comment.