File tree Expand file tree Collapse file tree 4 files changed +7
-2
lines changed
src/main/java/com/stripe/example Expand file tree Collapse file tree 4 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ dependencies {
22
22
/* Used for server calls */
23
23
implementation ' com.squareup.okio:okio:2.2.2'
24
24
implementation ' com.squareup.retrofit2:retrofit:2.6.0'
25
+ implementation ' com.facebook.stetho:stetho:1.5.1'
26
+ implementation ' com.facebook.stetho:stetho-okhttp3:1.5.1'
25
27
26
28
/* Used to make Retrofit easier and GSON & Rx-compatible*/
27
29
implementation ' com.google.code.gson:gson:2.8.5'
Original file line number Diff line number Diff line change 2
2
3
3
import android .support .multidex .MultiDexApplication ;
4
4
5
+ import com .facebook .stetho .Stetho ;
5
6
import com .squareup .leakcanary .LeakCanary ;
6
7
7
8
public class ExampleApplication extends MultiDexApplication {
@@ -10,6 +11,8 @@ public class ExampleApplication extends MultiDexApplication {
10
11
public void onCreate () {
11
12
super .onCreate ();
12
13
14
+ Stetho .initializeWithDefaults (this );
15
+
13
16
if (BuildConfig .DEBUG && LeakCanary .isInAnalyzerProcess (this )) {
14
17
// This process is dedicated to LeakCanary for heap analysis.
15
18
// You should not init your app in this process.
Original file line number Diff line number Diff line change 3
3
import android .support .annotation .NonNull ;
4
4
import android .support .annotation .Nullable ;
5
5
6
+ import com .facebook .stetho .okhttp3 .StethoInterceptor ;
6
7
import com .google .gson .Gson ;
7
8
import com .google .gson .GsonBuilder ;
8
9
@@ -31,6 +32,7 @@ public static Retrofit getInstance() {
31
32
32
33
final OkHttpClient httpClient = new OkHttpClient .Builder ()
33
34
.addInterceptor (logging )
35
+ .addNetworkInterceptor (new StethoInterceptor ())
34
36
.build ();
35
37
36
38
final Gson gson = new GsonBuilder ()
Original file line number Diff line number Diff line change @@ -34,8 +34,6 @@ dependencies {
34
34
androidTestImplementation ' com.android.support.test:rules:1.0.2'
35
35
androidTestImplementation ' androidx.test:runner:1.2.0'
36
36
androidTestUtil ' androidx.test:orchestrator:1.2.0'
37
-
38
- testAnnotationProcessor ' com.google.auto.service:auto-service:1.0-rc4'
39
37
}
40
38
41
39
android {
You can’t perform that action at this time.
0 commit comments