Skip to content

Commit c0e1ed2

Browse files
author
Github
committed
Fixed build version handling from Gradle so now it's actually a string instead of a double
1 parent f3b64cc commit c0e1ed2

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

app/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@ android {
77
applicationId "eu.aero2x.andromedab"
88
minSdkVersion 19
99
targetSdkVersion 25
10-
versionCode 2
11-
versionName "1.2.1"
10+
versionCode 4
11+
versionName "1.2.0.1"
1212
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
1313
}
1414
buildTypes {
1515
release {
1616
minifyEnabled false
1717
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18-
buildConfigField "double", "MIN_SERVER_VERSION", "1.2"
18+
buildConfigField "String", "MIN_SERVER_VERSION", '"1.2.0"'
1919
}
2020
debug{
21-
buildConfigField "double", "MIN_SERVER_VERSION", "1.2"
21+
buildConfigField "String", "MIN_SERVER_VERSION", '"1.2.0"'
2222
}
2323

2424
}

app/src/main/java/eu/aero2x/andromedab/ContactSelect.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ public void onResponse(String response) {
264264

265265

266266
//Check if our server version is below the app's required
267-
if (serverVersion.compareTo(new Version("" + BuildConfig.MIN_SERVER_VERSION)) < 0) {
267+
if (serverVersion.compareTo(new Version(BuildConfig.MIN_SERVER_VERSION)) < 0) {
268268
AlertDialog alertDialog = new AlertDialog.Builder(ContactSelect.this).create();
269269
alertDialog.setTitle("Server version too old");
270270
alertDialog.setMessage("Your server is running version " + serverVersion.get() + " but the BUILDCONFIG for the application demands that you be running at least " + BuildConfig.MIN_SERVER_VERSION + "\n\nYou can continue to use the application however behavior is entirely undocumented.");

0 commit comments

Comments
 (0)