Add Dagger (#554)

* Add Dagger DI

* Preemptively fix tests

* Add missing licenses

* DI fixes

* ci fixes
This commit is contained in:
Ivan Kupalov 2018-03-27 20:47:00 +03:00 committed by Konrad Pozniak
commit a5cffe0fea
41 changed files with 1040 additions and 415 deletions

View file

@ -47,6 +47,7 @@ import okhttp3.ConnectionSpec;
import okhttp3.Interceptor;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.logging.HttpLoggingInterceptor;
public class OkHttpUtils {
private static final String TAG = "OkHttpUtils"; // logging tag
@ -91,6 +92,10 @@ public class OkHttpUtils {
builder.proxy(new Proxy(Proxy.Type.HTTP, address));
}
if(BuildConfig.DEBUG) {
builder.addInterceptor(new HttpLoggingInterceptor().setLevel(HttpLoggingInterceptor.Level.BASIC));
}
return enableHigherTlsOnPreLollipop(builder);
}