aboutsummaryrefslogtreecommitdiff
path: root/android-lib.gradle
diff options
context:
space:
mode:
Diffstat (limited to 'android-lib.gradle')
-rw-r--r--android-lib.gradle9
1 files changed, 7 insertions, 2 deletions
diff --git a/android-lib.gradle b/android-lib.gradle
index d3651dc..123aec7 100644
--- a/android-lib.gradle
+++ b/android-lib.gradle
@@ -8,6 +8,11 @@ android {
compileSdkVersion Integer.parseInt(project.TARGET_SDK)
buildToolsVersion project.BUILD_TOOLS
+ androidGitVersion {
+ codeFormat = 'MMNNPPXX'
+ format = '%tag%%.count%%-commit%'
+ }
+
def kauMinSdk = project.MIN_SDK
if (project.hasProperty('kauSubModuleMinSdk'))
kauMinSdk = kauSubModuleMinSdk
@@ -21,8 +26,8 @@ android {
defaultConfig {
minSdkVersion Integer.parseInt(kauMinSdk)
targetSdkVersion Integer.parseInt(project.TARGET_SDK)
- versionName project.VERSION_NAME
- versionCode project.VERSION_CODE
+ versionName androidGitVersion.name()
+ versionCode androidGitVersion.code()
consumerProguardFiles 'progress-proguard.txt'
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"