aboutsummaryrefslogtreecommitdiff
path: root/sample/build.gradle
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-07-02 12:35:56 -0700
committerAllan Wang <me@allanwang.ca>2017-07-02 12:35:56 -0700
commit087cf39f15a0388a79dbe13a41f2ee59a519847c (patch)
tree5a278deab01e06fefd06088e3ec3b91209ef72cc /sample/build.gradle
parentc0decd6f72d825db989275e216aa97741cce412f (diff)
downloadkau-087cf39f15a0388a79dbe13a41f2ee59a519847c.tar.gz
kau-087cf39f15a0388a79dbe13a41f2ee59a519847c.tar.bz2
kau-087cf39f15a0388a79dbe13a41f2ee59a519847c.zip
Update readme and use git versioning
Diffstat (limited to 'sample/build.gradle')
-rw-r--r--sample/build.gradle13
1 files changed, 11 insertions, 2 deletions
diff --git a/sample/build.gradle b/sample/build.gradle
index 8429f11..3e107a7 100644
--- a/sample/build.gradle
+++ b/sample/build.gradle
@@ -1,3 +1,7 @@
+plugins {
+ id 'com.gladed.androidgitversion' version '0.3.4'
+}
+
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
@@ -5,12 +9,17 @@ android {
compileSdkVersion Integer.parseInt(project.TARGET_SDK)
buildToolsVersion project.BUILD_TOOLS
+ androidGitVersion {
+ codeFormat = 'MMNNPP'
+ prefix 'v'
+ }
+
defaultConfig {
applicationId "${project.APP_GROUP}." + project.APP_ID.toLowerCase() + ".sample"
minSdkVersion Integer.parseInt(project.MIN_SDK)
targetSdkVersion Integer.parseInt(project.TARGET_SDK)
- versionCode Integer.parseInt(project.VERSION_CODE)
- versionName project.VERSION_NAME
+ versionCode androidGitVersion.code()
+ versionName androidGitVersion.name()
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {