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 --- library/build.gradle | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'library') diff --git a/library/build.gradle b/library/build.gradle index 6b78ca8..714708b 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -1,3 +1,7 @@ +plugins { + id 'com.gladed.androidgitversion' version '0.3.4' +} + apply plugin: 'com.android.library' apply plugin: 'kotlin-android' apply plugin: 'com.github.dcendents.android-maven' @@ -8,11 +12,16 @@ android { compileSdkVersion Integer.parseInt(project.TARGET_SDK) buildToolsVersion project.BUILD_TOOLS + androidGitVersion { + codeFormat = 'MMNNPP' + prefix 'v' + } + defaultConfig { 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() consumerProguardFiles 'progress-proguard.txt' testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } -- cgit v1.2.3