aboutsummaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2018-01-20 21:58:59 -0500
committerGitHub <noreply@github.com>2018-01-20 21:58:59 -0500
commit097d2e0a393294bb239a2455a9a75a405a220fad (patch)
treea736d7ff07bad86724dbad846d51e3ad867a22c2 /sample
parent87aba7cff2e01cc71a2e319ccc96cc1e159bdcd3 (diff)
downloadkau-097d2e0a393294bb239a2455a9a75a405a220fad.tar.gz
kau-097d2e0a393294bb239a2455a9a75a405a220fad.tar.bz2
kau-097d2e0a393294bb239a2455a9a75a405a220fad.zip
Add back git tag versioning (#129)
Diffstat (limited to 'sample')
-rw-r--r--sample/build.gradle12
1 files changed, 10 insertions, 2 deletions
diff --git a/sample/build.gradle b/sample/build.gradle
index 6526306..bfe5182 100644
--- a/sample/build.gradle
+++ b/sample/build.gradle
@@ -1,3 +1,6 @@
+plugins {
+ id 'com.gladed.androidgitversion' version '0.4.3'
+}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'com.github.triplet.play'
@@ -14,12 +17,17 @@ android {
compileSdkVersion Integer.parseInt(project.TARGET_SDK)
buildToolsVersion project.BUILD_TOOLS
+ androidGitVersion {
+ codeFormat = 'MMNNPPXX'
+ format = '%tag%%.count%%-commit%'
+ }
+
defaultConfig {
applicationId "ca.allanwang.kau.sample"
minSdkVersion Integer.parseInt(project.MIN_SDK)
targetSdkVersion Integer.parseInt(project.TARGET_SDK)
- versionName project.VERSION_NAME
- versionCode project.VERSION_CODE
+ versionName androidGitVersion.name()
+ versionCode androidGitVersion.code()
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}