From 52dced43ff343e73d18b8ce0312c7bdb96db4187 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 11 Jul 2019 16:49:06 +0200 Subject: [PATCH] Fix version code issue --- vector/build.gradle | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/vector/build.gradle b/vector/build.gradle index 7170dfac76..b4f27d7eb0 100644 --- a/vector/build.gradle +++ b/vector/build.gradle @@ -12,9 +12,9 @@ androidExtensions { experimental = true } -def versionMajor = 0 -def versionMinor = 1 -def versionPatch = 0 +ext.versionMajor = 0 +ext.versionMinor = 1 +ext.versionPatch = 0 static def getGitTimestamp() { def cmd = 'git show -s --format=%ct' @@ -63,7 +63,11 @@ android { minSdkVersion 19 targetSdkVersion 28 multiDexEnabled true - versionCode generateVersionCodeFromTimestamp() + + // For release, use generateVersionCodeFromVersionName() + // versionCode generateVersionCodeFromTimestamp() + versionCode generateVersionCodeFromVersionName() + versionName "${versionMajor}.${versionMinor}.${versionPatch}" buildConfigField "String", "GIT_REVISION", "\"${gitRevision()}\""