davidliu

add RELEASE_SIGNING_ENABLED flag to mvn push gradle script

... ... @@ -51,6 +51,8 @@ signing.keyId=
signing.password=
signing.secretKeyRingFile=
RELEASE_SIGNING_ENABLED=true
# For instrumented tests.
# WARNING: Do not edit this and potentially commit to repo.
# Instead, override in ~/.gradle/gradle.properties
... ...
... ... @@ -47,6 +47,10 @@ def getRepositoryPassword() {
return hasProperty('nexusPassword') ? nexusPassword : ""
}
boolean getReleaseSigningEnabled() {
return hasProperty('RELEASE_SIGNING_ENABLED') ? RELEASE_SIGNING_ENABLED.toBoolean() : true
}
def configurePom(pom) {
pom.name = POM_NAME
pom.packaging = POM_PACKAGING
... ... @@ -151,9 +155,11 @@ afterEvaluate { project ->
configurePom(publication.pom)
}
signing {
publishing.publications.all { publication ->
sign publication
if (getReleaseSigningEnabled()) {
signing {
publishing.publications.all { publication ->
sign publication
}
}
}
}
\ No newline at end of file
... ...