diff --git a/android/app/build.gradle b/android/app/build.gradle index b5f35fae6..ac4f91198 100755 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -9,8 +9,8 @@ android { applicationId "org.openbot" minSdkVersion 21 targetSdkVersion 29 - versionCode 50 - versionName "0.5.0" + versionCode getVersionCode() + versionName getVersionName() ndk { abiFilters 'armeabi-v7a', 'arm64-v8a' } @@ -148,3 +148,7 @@ dependencies { implementation 'com.koushikdutta.ion:ion:3.1.0' implementation 'com.google.code.gson:gson:2.8.6' } + +println("Version Code: " + getVersionCode()) +println("Version Name: " + getVersionName()) + diff --git a/android/build.gradle b/android/build.gradle index 363977e73..91e814b40 100755 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,4 +1,10 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. +ext.versionMajor = 0 +ext.versionMinor = 5 +ext.versionPatch = 0 +ext.getVersionCode = { -> ext.versionMajor * 100 + ext.versionMinor * 10 + ext.versionPatch} +ext.getVersionName = { -> "${ext.versionMajor}.${ext.versionMinor}.${ext.versionPatch}"} + buildscript { ext.kotlin_version = '1.5.10' diff --git a/android/controller/build.gradle b/android/controller/build.gradle index fa72f9267..78b3ebf6f 100644 --- a/android/controller/build.gradle +++ b/android/controller/build.gradle @@ -12,8 +12,8 @@ android { defaultConfig { minSdkVersion 21 targetSdkVersion 30 - versionCode 50 - versionName "0.5.0" + versionCode getVersionCode() + versionName getVersionName() testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" @@ -81,4 +81,7 @@ dependencies { // apply plugin: 'com.android.library' apply plugin: 'com.android.application' apply plugin: 'kotlin-android' -} \ No newline at end of file +} + +println("Version Code: " + getVersionCode()) +println("Version Name: " + getVersionName()) \ No newline at end of file