File tree Expand file tree Collapse file tree 3 files changed +18
-5
lines changed
Expand file tree Collapse file tree 3 files changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -9,8 +9,8 @@ android {
99 applicationId " org.openbot"
1010 minSdkVersion 21
1111 targetSdkVersion 29
12- versionCode 50
13- versionName " 0.5.0 "
12+ versionCode getVersionCode()
13+ versionName getVersionName()
1414 ndk {
1515 abiFilters ' armeabi-v7a' , ' arm64-v8a'
1616 }
@@ -148,3 +148,7 @@ dependencies {
148148 implementation ' com.koushikdutta.ion:ion:3.1.0'
149149 implementation ' com.google.code.gson:gson:2.8.6'
150150}
151+
152+ println (" Version Code: " + getVersionCode())
153+ println (" Version Name: " + getVersionName())
154+
Original file line number Diff line number Diff line change 11// Top-level build file where you can add configuration options common to all sub-projects/modules.
2+ ext. versionMajor = 0
3+ ext. versionMinor = 5
4+ ext. versionPatch = 0
5+ ext. getVersionCode = { -> ext. versionMajor * 100 + ext. versionMinor * 10 + ext. versionPatch}
6+ ext. getVersionName = { -> " ${ ext.versionMajor} .${ ext.versionMinor} .${ ext.versionPatch} " }
7+
28buildscript {
39 ext. kotlin_version = ' 1.5.10'
410
Original file line number Diff line number Diff line change @@ -12,8 +12,8 @@ android {
1212 defaultConfig {
1313 minSdkVersion 21
1414 targetSdkVersion 30
15- versionCode 50
16- versionName " 0.5.0 "
15+ versionCode getVersionCode()
16+ versionName getVersionName()
1717
1818 testInstrumentationRunner " androidx.test.runner.AndroidJUnitRunner"
1919
@@ -81,4 +81,7 @@ dependencies {
8181 // apply plugin: 'com.android.library'
8282 apply plugin : ' com.android.application'
8383 apply plugin : ' kotlin-android'
84- }
84+ }
85+
86+ println (" Version Code: " + getVersionCode())
87+ println (" Version Name: " + getVersionName())
You can’t perform that action at this time.
0 commit comments