Commit 49fca982 authored by Niklas Fix's avatar Niklas Fix 🎓

fix: set baseURL depending on BuildConfig type

parent 1c9cbbcf
......@@ -34,7 +34,11 @@ android {
}
}
buildTypes {
debug {
buildConfigField("String", "BASE_URL", '"https://dev.akamu.de/api/v2/"')
}
release {
buildConfigField("String", "BASE_URL", '"https://akamu.de/api/v2/"')
signingConfig signingConfigs.release
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
......
......@@ -14,6 +14,7 @@ import java.util.Map;
import java.util.Objects;
import java.util.TimeZone;
import de.akamu.tudarmstadt.BuildConfig;
import de.akamu.tudarmstadt.api.interceptor.LoggingInterceptor;
import de.akamu.tudarmstadt.api.interceptor.TokenInterceptor;
import de.akamu.tudarmstadt.api.interceptor.UnauthorizedInterceptor;
......@@ -35,8 +36,7 @@ import okhttp3.Response;
public final class V2API {
private static final MediaType JSON = MediaType.parse("application/json; charset=utf-8");
private static final String baseURL = "https://akamu.de/api/v2/";
// private static final String baseURL = "https://dev.akamu.de/api/v2/"; // Dev version of server
private static final String baseURL = BuildConfig.BASE_URL;
private static String token = "";
private static Date expire;
private static final OkHttpClient client = new OkHttpClient.Builder()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment