Skip to content

Commit 1db1e74

Browse files
committed
chuck interceptor
1 parent d940889 commit 1db1e74

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

raven-android-sdk/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ android {
2020
minSdkVersion 21
2121
targetSdkVersion 30
2222
versionCode 1
23-
versionName "1.0.4"
23+
versionName "1.0.5"
2424

2525
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
2626
consumerProguardFiles 'consumer-rules.pro'
@@ -50,8 +50,8 @@ dependencies {
5050
implementation 'com.squareup.retrofit2:converter-gson:2.6.2'
5151
implementation 'com.squareup.okhttp3:logging-interceptor:4.2.1'
5252

53-
debugImplementation 'com.readystatesoftware.chuck:library:1.1.0'
54-
releaseImplementation 'com.readystatesoftware.chuck:library-no-op:1.1.0'
53+
implementation 'com.readystatesoftware.chuck:library:1.1.0'
54+
// releaseImplementation 'com.readystatesoftware.chuck:library-no-op:1.1.0'
5555
}
5656

5757
// Because the components are created only during the afterEvaluate phase, you must
@@ -67,7 +67,7 @@ afterEvaluate {
6767
// You can then customize attributes of the publication as shown below.
6868
groupId = 'com.raven'
6969
artifactId = 'raven-android-sdk'
70-
version = '1.0.4'
70+
version = '1.0.5'
7171
}
7272
}
7373
}

raven-android-sdk/src/main/java/com/raven/ravenandroidsdk/api/ApiProvider.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package com.raven.ravenandroidsdk.api
22

33
import android.content.Context
44
import com.google.gson.GsonBuilder
5+
import com.raven.ravenandroidsdk.BuildConfig
56
import com.readystatesoftware.chuck.ChuckInterceptor
67
import okhttp3.Interceptor
78
import okhttp3.OkHttpClient
@@ -40,7 +41,9 @@ internal class ApiProvider(context: Context) {
4041
val interceptor = HttpLoggingInterceptor()
4142
interceptor.apply { interceptor.level = HttpLoggingInterceptor.Level.BODY }
4243
val httpClient = OkHttpClient.Builder().callTimeout(15, TimeUnit.SECONDS)
43-
httpClient.addInterceptor(ChuckInterceptor(app.applicationContext))
44+
if (BuildConfig.DEBUG) {
45+
httpClient.addInterceptor(ChuckInterceptor(app.applicationContext))
46+
}
4447

4548
if (secretKey != null) {
4649
httpClient.addInterceptor(object : Interceptor {

0 commit comments

Comments
 (0)