diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 1d0746f5..6f71b3b6 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -28,7 +28,7 @@ android { applicationId = "com.teamwiney.winey" minSdk = 24 targetSdk = 34 - versionCode = 2 + versionCode = 3 versionName = "1.0" signingConfig = signingConfigs.getByName("debug") diff --git a/data/src/main/java/com/teamwiney/data/network/interceptor/AuthInterceptor.kt b/data/src/main/java/com/teamwiney/data/network/interceptor/AuthInterceptor.kt index 9fb0b1c4..23f961f0 100644 --- a/data/src/main/java/com/teamwiney/data/network/interceptor/AuthInterceptor.kt +++ b/data/src/main/java/com/teamwiney/data/network/interceptor/AuthInterceptor.kt @@ -81,7 +81,7 @@ private fun createOkHttpClient( refreshToken: String, context: Context ): OkHttpClient { - return OkHttpClient.Builder() + val builder = OkHttpClient.Builder() .addNetworkInterceptor( HttpLoggingInterceptor() .apply { @@ -90,7 +90,6 @@ private fun createOkHttpClient( } } ) - .addNetworkInterceptor(ChuckerInterceptor(context)) .addInterceptor { chain -> val originalRequest = chain.request() val modifiedRequest = originalRequest.newBuilder() @@ -99,5 +98,10 @@ private fun createOkHttpClient( chain.proceed(modifiedRequest) } - .build() + + if (BuildConfig.DEBUG) { + builder.addNetworkInterceptor(ChuckerInterceptor(context)) + } + + return builder.build() }