Skip to content

Commit

Permalink
Merge pull request #263 from isl-org/thias15/app-versioning
Browse files Browse the repository at this point in the history
update gradle files
  • Loading branch information
thias15 authored Feb 18, 2022
2 parents 23bd8ef + 9a1d35f commit 465cd96
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
8 changes: 6 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
Expand Down Expand Up @@ -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())

6 changes: 6 additions & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -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'

Expand Down
9 changes: 6 additions & 3 deletions android/controller/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -81,4 +81,7 @@ dependencies {
// apply plugin: 'com.android.library'
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
}
}

println("Version Code: " + getVersionCode())
println("Version Name: " + getVersionName())

0 comments on commit 465cd96

Please sign in to comment.