From 097d2e0a393294bb239a2455a9a75a405a220fad Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Sat, 20 Jan 2018 21:58:59 -0500 Subject: Add back git tag versioning (#129) --- sample/build.gradle | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'sample') 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" } -- cgit v1.2.3