Skip to content

Commit

Permalink
Added one more property SNAPSHOT (optional).
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleksii Kropachov committed Sep 8, 2014
1 parent cc18d56 commit 202dce6
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion gradle-mvn-push.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 202dce6

Please sign in to comment.