Build changes.

This commit is contained in:
Amine Bou 2017-12-04 20:07:30 +01:00
parent 2ceb0f988b
commit bd08b8aba3
2 changed files with 19 additions and 5 deletions

View File

@ -1,3 +1,9 @@
**1.5.5.x**
- Completed Dutch and Indonesian translation !
- Changed versions handling.
**1.5.4.22** **1.5.4.22**
- You can now scroll through the loaded articles ! - You can now scroll through the loaded articles !

View File

@ -8,19 +8,27 @@ buildscript {
} }
} }
ext {
configuration = [
buildDate: new Date()
]
}
def gitVersion() { def gitVersion() {
def process = "git describe --abbrev=0 --tags".execute() def process = "git describe --abbrev=0 --tags".execute()
return process.text.substring(1).replaceAll("\\.", "") return process.text.substring(1).replaceAll("\\.", "").trim()
} }
def versionCodeFromGit() { def versionCodeFromGit() {
println "version code " + gitVersion().toInteger() def versionCode = gitVersion() + (ext.configuration.buildDate.format("SSssmm")).toInteger()
return gitVersion().toInteger() println "version code " + versionCode
return versionCode.toInteger()
} }
def versionNameFromGit() { def versionNameFromGit() {
println "version code " + gitVersion().trim() def versionName = gitVersion() + ext.configuration.buildDate.format('yyyyMMddHHmm')
return gitVersion().trim() println "version name " + versionName
return versionName
} }
apply plugin: 'org.sonarqube' apply plugin: 'org.sonarqube'