Skip to content

Commit

Permalink
Adapt to backend changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Luca Sardonini committed Jun 29, 2018
1 parent 99ed216 commit d7cd171
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public static Departure fromBackend(ch.liip.timeforcoffee.backend.Departure back
backendDeparture.getPlatform(),
colorFg,
colorBg,
false,
backendDeparture.isAccessible(),
false
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ public class Departure {
private Station destination;
private String line;
private String platform;
private boolean accessible;
private Color color;
private Time departure;
private Time arrival;
Expand All @@ -23,6 +24,10 @@ public String getPlatform() {
return platform;
}

public boolean isAccessible() {
return accessible;
}

public Color getColor() {
return color;
}
Expand Down
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ ext {
KEYSTORE_PATH = project.hasProperty('keystoreFilePath') ? project.property('keystoreFilePath') : "."
KEYSTORE_STORE_PASS = project.hasProperty('keystoreStorePass') ? project.property('keystoreStorePass') : ""

BACKEND_DEV_URL = "https://timeforcoffee-backend-staging.herokuapp.com"
BACKEND_PROD_URL = "https://timeforcoffee-backend.herokuapp.com"
BACKEND_BASIC_AUTH_USERNAME = project.hasProperty('backendBasicAuthUsername') ? project.property('backendBasicAuthUsername') : ""
BACKEND_BASIC_AUTH_PASSWORD = project.hasProperty('backendBasicAuthPassword') ? project.property('backendBasicAuthPassword') : ""

Expand Down
2 changes: 2 additions & 0 deletions mobile/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,14 @@ android {
minifyEnabled false
applicationIdSuffix '.dev'
versionNameSuffix '-DEV'
buildConfigField "String", "BACKEND_URL", "\"" + project.BACKEND_DEV_URL + "\""
}
release {
debuggable false
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
buildConfigField "String", "BACKEND_URL", "\"" + project.BACKEND_PROD_URL + "\""
}
}
flavorDimensions "mobile"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ BackendService provideBackendService() {
.create();

RestAdapter restAdapter = new RestAdapter.Builder()
.setEndpoint("https://timeforcoffee-backend.herokuapp.com")
.setEndpoint(BuildConfig.BACKEND_URL)
.setConverter(new GsonConverter(gson))
.setRequestInterceptor(new RequestInterceptor() {
@Override
Expand Down

0 comments on commit d7cd171

Please sign in to comment.