check available beta version
[pub/Android/ownCloud.git] / build.gradle
index be674c9..d707b02 100644 (file)
@@ -3,13 +3,12 @@ buildscript {
         mavenCentral()
     }
     dependencies {
-        classpath 'com.android.tools.build:gradle:1.2.3'
+        classpath 'com.android.tools.build:gradle:1.3.0'
     }
 }
 
 apply plugin: 'com.android.application'
 
-
 repositories {
     mavenCentral()
 
@@ -33,6 +32,7 @@ android {
 
     defaultConfig {
         applicationId "com.owncloud.android.beta"
+        versionCode computeVersionCode()
     }
 
     sourceSets {
@@ -73,4 +73,8 @@ android {
     }
 }
 
-
+def computeVersionCode() {
+    def date = new Date()
+    def formattedDate = date.format('yyyyMMdd').toInteger()
+    return formattedDate
+}
\ No newline at end of file