diff options
Diffstat (limited to 'sample')
-rw-r--r-- | sample/build.gradle | 12 |
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" } |