Skip to content

Commit

Permalink
Updated Gralde plugin to 7.3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
depryf committed Dec 23, 2021
1 parent e8c0abf commit 2c68208
Show file tree
Hide file tree
Showing 3 changed files with 183 additions and 134 deletions.
58 changes: 29 additions & 29 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
id "io.codearte.nexus-staging" version '0.30.0'
id 'com.adarshr.test-logger' version '3.0.0'
id "com.github.ben-manes.versions" version '0.38.0'
id 'org.sonatype.gradle.plugins.scan' version '2.0.9'
id 'io.github.gradle-nexus.publish-plugin' version '1.1.0'
id 'org.sonatype.gradle.plugins.scan' version '2.2.2'
id "com.github.ben-manes.versions" version '0.39.0'
}

group = 'com.imsweb'
Expand Down Expand Up @@ -78,12 +77,6 @@ ossIndexAudit {
}
check.dependsOn 'ossIndexAudit'

// configure nexus staging plugin
nexusStaging {
numberOfRetries = 50
delayBetweenRetriesInMillis = 5000
}

// needed to deploy to Maven Central
publishing {
publications {
Expand Down Expand Up @@ -128,18 +121,6 @@ publishing {
}
}
}
repositories {
maven {
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2"
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl

credentials {
username = project.findProperty('nexusUsername') ?: ''
password = project.findProperty('nexusPassword') ?: ''
}
}
}
}

// setup JAR signing
Expand All @@ -152,6 +133,31 @@ signing {
sign publishing.publications.mavenJava
}

// needed to release on maven central
nexusPublishing {
repositories {
sonatype {
stagingProfileId = 'ImsSeeDataUtilityProfileId'

username = project.findProperty("nexusUsername")
password = project.findProperty("nexusPassword")
}
}

clientTimeout = java.time.Duration.ofSeconds(300)
connectTimeout = java.time.Duration.ofSeconds(60)

transitionCheckOptions {
maxRetries.set(50)
delayBetween.set(java.time.Duration.ofMillis(5000))
}
}

// don't try to release a snapshot to a non-snapshot repository, that won't work anyway
if (version.endsWith('-SNAPSHOT')) {
gradle.startParameter.excludedTaskNames += 'signMavenJavaPublication'
gradle.startParameter.excludedTaskNames += 'closeAndReleaseSonatypeStagingRepository'
}

// this will add the XML-related tasks
configurations {
Expand Down Expand Up @@ -180,15 +186,9 @@ task generateSeerrxXmlEntities {
}
}

// don't try to release a snapshot to a non-snapshot repository, that won't work anyway
if (version.endsWith('-SNAPSHOT')) {
gradle.startParameter.excludedTaskNames += 'signMavenJavaPublication'
gradle.startParameter.excludedTaskNames += 'closeAndReleaseRepository'
}

// Gradle wrapper, this allows to build the project without having to install Gradle!
wrapper {
gradleVersion = '7.2'
gradleVersion = '7.3.3'
distributionType = Wrapper.DistributionType.ALL
}

2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 2c68208

Please sign in to comment.