From 7cebb114fde77443c9643bb95603e8284a0258de Mon Sep 17 00:00:00 2001 From: DongChyeon Date: Mon, 8 Apr 2024 00:38:36 +0900 Subject: [PATCH] =?UTF-8?q?Fix=20:=20release=20=EB=B9=8C=EB=93=9C=20?= =?UTF-8?q?=EC=8B=9C=20=EC=95=A1=EC=84=B8=EC=8A=A4=20=ED=86=A0=ED=81=B0=20?= =?UTF-8?q?=EA=B0=B1=EC=8B=A0=20API=EC=97=90=20=EB=8C=80=ED=95=9C=20?= =?UTF-8?q?=EB=84=A4=ED=8A=B8=EC=9B=8C=ED=81=AC=20=EB=A1=9C=EA=B1=B0=20?= =?UTF-8?q?=EB=AF=B8=EB=B6=80=EC=B0=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle.kts | 2 +- .../data/network/interceptor/AuthInterceptor.kt | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) 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() }