Using date as versionCode and automatically setting version-name now with major.minor.date

This commit is contained in:
Alexander Pacha
2016-09-20 18:47:48 +02:00
parent 2979c6e78a
commit 7bbf590bfb

View File

@@ -1,5 +1,9 @@
apply plugin: 'com.android.application'
def date = new Date()
def formattedDate = date.format('yyMMddHHmm')
def code = formattedDate.toInteger()
android {
compileSdkVersion 24
buildToolsVersion "24.0.2"
@@ -8,8 +12,8 @@ android {
applicationId "org.hitlabnz.sensor_fusion_demo"
minSdkVersion 18
targetSdkVersion 24
versionCode 5
versionName "1.4"
versionCode code
versionName "1.4." + formattedDate
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}