diff --git a/gradle-mvn-push.gradle b/gradle-mvn-push.gradle index 724e01c..cf1d920 100644 --- a/gradle-mvn-push.gradle +++ b/gradle-mvn-push.gradle @@ -17,8 +17,16 @@ apply plugin: 'maven' apply plugin: 'signing' +def isSnapshotProperty() { + return hasProperty('SNAPSHOT') ? SNAPSHOT as boolean : false +} + +def isSnapshotBuild() { + return VERSION_NAME.contains("SNAPSHOT") || isSnapshotProperty() +} + def isReleaseBuild() { - return VERSION_NAME.contains("SNAPSHOT") == false + return !isSnapshotBuild() } def getReleaseRepositoryUrl() {