Revert "Add Stetho to debug application (#18)"

This reverts commit cc2fb772
Stetho seems to be unmaintained anymore
It also doesn't work with latest Chrome
This commit is contained in:
Kirill Kamakin
2021-11-28 20:36:30 +03:00
parent 412bd190be
commit 81fb1ae984
3 changed files with 2 additions and 15 deletions

View File

@@ -155,11 +155,6 @@ dependencies {
// https://mvnrepository.com/artifact/com.google.truth/truth // https://mvnrepository.com/artifact/com.google.truth/truth
testImplementation "com.google.truth:truth:1.1.3" testImplementation "com.google.truth:truth:1.1.3"
// https://github.com/facebook/stetho/releases
def stetho_version = "1.6.0"
implementation "com.facebook.stetho:stetho:$stetho_version"
implementation "com.facebook.stetho:stetho-okhttp3:$stetho_version"
// https://github.com/androidbroadcast/ViewBindingPropertyDelegate/releases // https://github.com/androidbroadcast/ViewBindingPropertyDelegate/releases
implementation "com.github.kirich1409:viewbindingpropertydelegate-noreflection:1.5.3" implementation "com.github.kirich1409:viewbindingpropertydelegate-noreflection:1.5.3"
} }

View File

@@ -1,7 +1,6 @@
package gq.kirmanak.mealient package gq.kirmanak.mealient
import android.app.Application import android.app.Application
import com.facebook.stetho.Stetho
import dagger.hilt.android.HiltAndroidApp import dagger.hilt.android.HiltAndroidApp
import timber.log.Timber import timber.log.Timber
@@ -9,10 +8,7 @@ import timber.log.Timber
class App : Application() { class App : Application() {
override fun onCreate() { override fun onCreate() {
super.onCreate() super.onCreate()
if (BuildConfig.DEBUG) { if (BuildConfig.DEBUG) Timber.plant(Timber.DebugTree())
Timber.plant(Timber.DebugTree())
Stetho.initializeWithDefaults(this)
}
Timber.v("onCreate() called") Timber.v("onCreate() called")
} }
} }

View File

@@ -1,6 +1,5 @@
package gq.kirmanak.mealient.data.impl package gq.kirmanak.mealient.data.impl
import com.facebook.stetho.okhttp3.StethoInterceptor
import gq.kirmanak.mealient.BuildConfig import gq.kirmanak.mealient.BuildConfig
import gq.kirmanak.mealient.data.auth.impl.AuthOkHttpInterceptor import gq.kirmanak.mealient.data.auth.impl.AuthOkHttpInterceptor
import okhttp3.Interceptor import okhttp3.Interceptor
@@ -15,11 +14,8 @@ class OkHttpBuilder @Inject constructor(
fun buildOkHttp(): OkHttpClient { fun buildOkHttp(): OkHttpClient {
Timber.v("buildOkHttp() called") Timber.v("buildOkHttp() called")
val builder = OkHttpClient.Builder() val builder = OkHttpClient.Builder()
if (BuildConfig.DEBUG) builder.addNetworkInterceptor(buildLoggingInterceptor())
builder.addNetworkInterceptor(authOkHttpInterceptor) builder.addNetworkInterceptor(authOkHttpInterceptor)
if (BuildConfig.DEBUG) {
builder.addNetworkInterceptor(buildLoggingInterceptor())
builder.addNetworkInterceptor(StethoInterceptor())
}
return builder.build() return builder.build()
} }