diff options
author | jkoan <jkoan@gmx.de> | 2021-01-11 19:53:18 +0100 |
---|---|---|
committer | jkoan <jkoan@gmx.de> | 2021-01-11 19:53:18 +0100 |
commit | dc7d5826cd44b82b73b7fa9d759f95c67400e95a (patch) | |
tree | 1f46d8aa7c96e78ae7a315d3319cc6d4b0b9f2c5 | |
parent | 5c315c1d61b4f6d983c160e2fdbeebd2e9b61406 (diff) | |
download | navit-dc7d5826cd44b82b73b7fa9d759f95c67400e95a.tar.gz |
change:build:android:Implement @mvglasow's Idea about a Versioncode every 15min's
-rw-r--r-- | gradle/scripts/git-scm-version.gradle | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gradle/scripts/git-scm-version.gradle b/gradle/scripts/git-scm-version.gradle index fbc447aad..c6a7cfa09 100644 --- a/gradle/scripts/git-scm-version.gradle +++ b/gradle/scripts/git-scm-version.gradle @@ -15,7 +15,11 @@ import java.time.format.DateTimeFormatter ext { git = Grgit.open(currentDir: projectDir) gitVersionName = git.describe(match: ["v[0-9.rc]*"]) - gitVersionCode = Integer.parseInt(DateTimeFormatter.ofPattern("yyyyMMddHH").format(git.head().dateTime)) + hh = Integer.parseInt(DateTimeFormatter.ofPattern("HH").format(git.head().dateTime)) + mm = Integer.parseInt(DateTimeFormatter.ofPattern("mm").format(git.head().dateTime)) + hhmm = Math.round((hh*4)+(mm/15)).toString() + yyyyMMdd = DateTimeFormatter.ofPattern("yyyyMMdd").format(git.head().dateTime) + gitVersionCode = Integer.parseInt(yyyyMMdd + hhmm) } task printVersion() { |