Automatically set version from git

- Uses last tag on master branch (this is set on 'git flow release finish')
- branch name snapshot otherwise, e.g. 'feature-nio-SNAPSHOT', 'develop-SNAPSHOT'
This commit is contained in:
2016-08-12 16:27:57 +02:00
parent 52422d3398
commit 86cfc66a40
4 changed files with 58 additions and 6 deletions

View File

@ -3,12 +3,10 @@ subprojects {
apply plugin: 'maven'
apply plugin: 'signing'
apply plugin: 'jacoco'
apply plugin: 'gitflow-version'
sourceCompatibility = 1.7
group = 'ch.dissem.jabit'
version = '1.1.0-SNAPSHOT'
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
repositories {
mavenCentral()
@ -35,7 +33,7 @@ subprojects {
}
signing {
required { isReleaseVersion && project.getProperties().get("signing.keyId")?.length() > 0 }
required { isRelease && project.getProperties().get("signing.keyId")?.length() > 0 }
sign configurations.archives
}