From 087cf39f15a0388a79dbe13a41f2ee59a519847c Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Sun, 2 Jul 2017 12:35:56 -0700 Subject: Update readme and use git versioning --- sample/build.gradle | 13 +++++++++++-- sample/src/main/res/xml/changelog.xml | 9 +++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) (limited to 'sample') 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 { diff --git a/sample/src/main/res/xml/changelog.xml b/sample/src/main/res/xml/changelog.xml index 6d76f24..534750c 100644 --- a/sample/src/main/res/xml/changelog.xml +++ b/sample/src/main/res/xml/changelog.xml @@ -6,6 +6,13 @@ --> + + + + + + + @@ -14,8 +21,6 @@ - - -- cgit v1.2.3