Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

483/Remove PlusClient dependencies #589

Merged
merged 13 commits into from
Mar 18, 2016
Merged
4 changes: 0 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ android {
buildConfigField "String", "IP_SIMPLE_API_ACCESS_KEY", "\"$local_properties.ip_simple_api_access_key_debug\""
buildConfigField "String", "ANDROID_SIMPLE_API_ACCESS_KEY", "\"$local_properties.android_simple_api_access_key_debug\""
resValue "string", "android_simple_api_access_key", local_properties.android_simple_api_access_key_debug ?: ""

multiDexEnabled true
}
}

Expand Down Expand Up @@ -136,7 +134,6 @@ dependencies {
compile "com.android.support:design:$rootProject.supportLibraryVersion"
compile "com.android.support:customtabs:$rootProject.supportLibraryVersion"
compile "com.android.support.test.espresso:espresso-idling-resource:$rootProject.espressoVersion"
debugCompile 'com.android.support:multidex:1.0.1'

//Play Services
compile "com.google.android.gms:play-services-games:$rootProject.playServicesVersion"
Expand All @@ -148,7 +145,6 @@ dependencies {

//Google
compile 'com.google.http-client:google-http-client-gson:1.21.0'
compile 'com.google.apis:google-api-services-plus:v1-rev126-1.18.0-rc'
compile 'com.google.android.apps.dashclock:dashclock-api:2.0.0'
compile 'com.google.zxing:android-integration:3.2.1'
compile 'com.google.zxing:core:3.2.1'
Expand Down
12 changes: 2 additions & 10 deletions app/src/debug/java/org/gdg/frisbee/android/app/BaseApp.java
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
package org.gdg.frisbee.android.app;

import android.content.Context;
import android.support.multidex.MultiDex;
import android.support.multidex.MultiDexApplication;
import android.app.Application;

public class BaseApp extends MultiDexApplication {

@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
MultiDex.install(this);
}
public class BaseApp extends Application {

protected void onAppUpdate(int oldVersion, int newVersion) {
}
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/org/gdg/frisbee/android/Const.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ public class Const {
public static final String CACHE_KEY_PULSE_GLOBAL = "pulse_global";
public static final String CACHE_KEY_GDE_LIST = "gde_list";
public static final String CACHE_KEY_FRISBEE_CONTRIBUTORS = "frisbee_contributor_list";
public static final String CACHE_KEY_PERSON = "person_";
public static final String CACHE_KEY_NEWS = "news_";
public static final String CACHE_KEY_PERSON = "person2_";
public static final String CACHE_KEY_NEWS = "news2_";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new model classes -> new cache keys

public static final String CACHE_KEY_PULSE = "pulse_";

private Const() {
Expand Down
24 changes: 24 additions & 0 deletions app/src/main/java/org/gdg/frisbee/android/api/ApiKeyAdder.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package org.gdg.frisbee.android.api;

import org.gdg.frisbee.android.BuildConfig;

import java.io.IOException;

import okhttp3.HttpUrl;
import okhttp3.Interceptor;
import okhttp3.Request;
import okhttp3.Response;

public class ApiKeyAdder implements Interceptor {
@Override
public Response intercept(Chain chain) throws IOException {
Request original = chain.request();

HttpUrl newUrl = original.url().newBuilder()
.addQueryParameter("key", BuildConfig.IP_SIMPLE_API_ACCESS_KEY).build();
Request.Builder requestBuilder = original.newBuilder().url(newUrl);

Request request = requestBuilder.build();
return chain.proceed(request);
}
}
6 changes: 3 additions & 3 deletions app/src/main/java/org/gdg/frisbee/android/api/Callback.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ public final void onResponse(Call<T> call, Response<T> response) {
} else {
try {
final Exception e = new Exception(response.errorBody().string());
Timber.e(e, "Network Error!");
Timber.e(e, "Response error!");
failure(e);
} catch (IOException e) {
Timber.e(e, "Network Error!");
Timber.e(e, "Network error after response error!");
failure(e);
}
}
}

@Override
public final void onFailure(Call<T> call, Throwable t) {
Timber.d(t, "Network Failure!");
Timber.d(t, "Network failure!");
networkFailure(t);
}

Expand Down
101 changes: 0 additions & 101 deletions app/src/main/java/org/gdg/frisbee/android/api/GapiOkHttpRequest.java

This file was deleted.

118 changes: 0 additions & 118 deletions app/src/main/java/org/gdg/frisbee/android/api/GapiOkResponse.java

This file was deleted.

75 changes: 0 additions & 75 deletions app/src/main/java/org/gdg/frisbee/android/api/GapiOkTransport.java

This file was deleted.

Loading