This should allow the build to no longer require signing to be setup.
This commit is contained in:
parent
5fbaa95ed0
commit
ea1a9a2e34
|
@ -4,6 +4,9 @@ plugins {
|
||||||
id 'signing'
|
id 'signing'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ext.isSnapshotVersion = version.endsWith("SNAPSHOT")
|
||||||
|
ext.isReleaseVersion = !ext.isSnapshotVersion
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
@ -38,6 +41,10 @@ java {
|
||||||
}
|
}
|
||||||
|
|
||||||
signing {
|
signing {
|
||||||
|
// Only sign if we're uploading...
|
||||||
|
required {
|
||||||
|
isReleaseVersion && gradle.taskGraph.hasTask("publish")
|
||||||
|
}
|
||||||
sign configurations.archives
|
sign configurations.archives
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,7 +81,7 @@ publishing {
|
||||||
maven {
|
maven {
|
||||||
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2"
|
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2"
|
||||||
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
|
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
|
||||||
url = version.endsWith("SNAPSHOT") ? snapshotsRepoUrl : releasesRepoUrl
|
url = isSnapshotVersion ? snapshotsRepoUrl : releasesRepoUrl
|
||||||
credentials {
|
credentials {
|
||||||
username = findProperty('ossrhUsername')
|
username = findProperty('ossrhUsername')
|
||||||
password = findProperty('ossrhPassword')
|
password = findProperty('ossrhPassword')
|
||||||
|
|
Loading…
Reference in New Issue