Skip to content
Snippets Groups Projects
Commit 766fb60a authored by Nikolaus Krismer's avatar Nikolaus Krismer
Browse files

reworked version management

(version can be set by gradle now. e.g. "./gradlew
-PprojectVersion=0.2.3 clean daily")
parent 8f52218e
No related branches found
No related tags found
No related merge requests found
......@@ -16,7 +16,6 @@ import org.apache.tools.ant.filters.FixCrLfFilter
import org.apache.tools.ant.filters.ReplaceTokens
group = 'it.unibz.inf.isochrone'
version = '0.2.2-SNAPSHOT'
description = 'PhD project of Nikolaus Krismer'
sourceCompatibility=1.7
......@@ -29,15 +28,18 @@ def getDate() {
}
ext {
defaultVersion = '0.1-SNAPSHOT'
defaultVersion = '0.2.2-SNAPSHOT'
isRelease = false
}
if (version.equalsIgnoreCase('unspecified')) {
version = defaultVersion
} else if (!version.matches(~/[0-9\.]*(-SNAPSHOT)?/)) {
println "Invalid version number '$version' given. Falling back to default!"
version = defaultVersion
if (project.hasProperty('projectVersion')) {
version = projectVersion
if (!version.matches(~/[0-9\.]*(-SNAPSHOT)?/)) {
println "Invalid version number '$version' given. Falling back to default!"
version = defaultVersion
}
} else {
version = defaultVersion;
}
if (version.endsWith('-SNAPSHOT')) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment