mirror of
https://github.com/readrops/Readrops.git
synced 2025-02-10 00:40:46 +01:00
Add Stetho debug bridge
This commit is contained in:
parent
cc9a78ba43
commit
d21a76c4e3
@ -56,7 +56,7 @@ dependencies {
|
|||||||
implementation 'androidx.paging:paging-runtime:2.1.0'
|
implementation 'androidx.paging:paging-runtime:2.1.0'
|
||||||
implementation 'androidx.paging:paging-common:2.1.0'
|
implementation 'androidx.paging:paging-common:2.1.0'
|
||||||
|
|
||||||
implementation 'joda-time:joda-time:2.9.9'
|
implementation 'joda-time:joda-time:2.10.1'
|
||||||
implementation 'org.jsoup:jsoup:1.11.3'
|
implementation 'org.jsoup:jsoup:1.11.3'
|
||||||
|
|
||||||
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
|
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
|
||||||
@ -66,4 +66,6 @@ dependencies {
|
|||||||
implementation 'com.mikepenz:fastadapter:3.3.1'
|
implementation 'com.mikepenz:fastadapter:3.3.1'
|
||||||
implementation 'com.mikepenz:fastadapter-commons:3.3.0'
|
implementation 'com.mikepenz:fastadapter-commons:3.3.0'
|
||||||
implementation 'com.mikepenz:materialdrawer:6.1.2'
|
implementation 'com.mikepenz:materialdrawer:6.1.2'
|
||||||
|
|
||||||
|
implementation 'com.facebook.stetho:stetho:1.5.1'
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,8 @@ package com.readrops.app.utils;
|
|||||||
|
|
||||||
import android.app.Application;
|
import android.app.Application;
|
||||||
|
|
||||||
|
import com.facebook.stetho.Stetho;
|
||||||
|
|
||||||
import io.reactivex.plugins.RxJavaPlugins;
|
import io.reactivex.plugins.RxJavaPlugins;
|
||||||
|
|
||||||
public class ReadropsApp extends Application {
|
public class ReadropsApp extends Application {
|
||||||
@ -11,5 +13,6 @@ public class ReadropsApp extends Application {
|
|||||||
super.onCreate();
|
super.onCreate();
|
||||||
|
|
||||||
RxJavaPlugins.setErrorHandler(e -> { });
|
RxJavaPlugins.setErrorHandler(e -> { });
|
||||||
|
Stetho.initializeWithDefaults(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -43,4 +43,5 @@ dependencies {
|
|||||||
implementation 'com.squareup.okhttp3:logging-interceptor:3.14.1'
|
implementation 'com.squareup.okhttp3:logging-interceptor:3.14.1'
|
||||||
|
|
||||||
implementation 'org.jsoup:jsoup:1.11.3'
|
implementation 'org.jsoup:jsoup:1.11.3'
|
||||||
|
implementation 'com.facebook.stetho:stetho-okhttp3:1.5.1'
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.readrops.readropslibrary.utils;
|
package com.readrops.readropslibrary.utils;
|
||||||
|
|
||||||
|
import com.facebook.stetho.okhttp3.StethoInterceptor;
|
||||||
import com.readrops.readropslibrary.BuildConfig;
|
import com.readrops.readropslibrary.BuildConfig;
|
||||||
import com.readrops.readropslibrary.services.Credentials;
|
import com.readrops.readropslibrary.services.Credentials;
|
||||||
|
|
||||||
@ -10,7 +11,6 @@ import okhttp3.Interceptor;
|
|||||||
import okhttp3.OkHttpClient;
|
import okhttp3.OkHttpClient;
|
||||||
import okhttp3.Request;
|
import okhttp3.Request;
|
||||||
import okhttp3.Response;
|
import okhttp3.Response;
|
||||||
import okhttp3.logging.HttpLoggingInterceptor;
|
|
||||||
|
|
||||||
public class HttpManager {
|
public class HttpManager {
|
||||||
|
|
||||||
@ -35,10 +35,8 @@ public class HttpManager {
|
|||||||
httpBuilder.addInterceptor(new AuthInterceptor());
|
httpBuilder.addInterceptor(new AuthInterceptor());
|
||||||
|
|
||||||
if (BuildConfig.DEBUG) {
|
if (BuildConfig.DEBUG) {
|
||||||
HttpLoggingInterceptor loggingInterceptor = new HttpLoggingInterceptor();
|
StethoInterceptor loggingInterceptor = new StethoInterceptor();
|
||||||
loggingInterceptor.setLevel(HttpLoggingInterceptor.Level.BASIC);
|
httpBuilder.addNetworkInterceptor(loggingInterceptor);
|
||||||
|
|
||||||
httpBuilder.addInterceptor(loggingInterceptor);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
okHttpClient = httpBuilder.build();
|
okHttpClient = httpBuilder.build();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user