6/22/2017 - 12:01 PM



 * Created by Admin on 6/22/17.
 * In debug build variant it will set up Stetho to use.
 * in release build variant it will do nothing
 * if you put file into debug folder of main directory make sure to delete file with
 * the same name from the main directory as it will lead to conflict
 /** Also see gradle and proguard gists
 // release build variant
object StethoUtils {

    fun install(application: Application) {
        // In release build variant do nothing

// debug bild variant
object StethoUtils {

    fun install(application: Application) {
//                        .enableWebKitInspector(Stetho.defaultInspectorModulesProvider(application))
 // This goes into debug folder under src folder 
 // The another one that sits in release folder doesn't add StethoInterceptor
    fun provideOkHttpClient(cache: Cache): OkHttpClient {
        val interceptor = HttpLoggingInterceptor()
        interceptor.level = HttpLoggingInterceptor.Level.BODY
        return OkHttpClient.Builder()
                // You should add Stetho interceptor only in debug build variant
//                .connectTimeout(30, TimeUnit.SECONDS)
//                .readTimeout(30, TimeUnit.SECONDS)
//                .writeTimeout(30, TimeUnit.SECONDS)