Skip to content

Commit

Permalink
Fixing AbstractMethodError
Browse files Browse the repository at this point in the history
  • Loading branch information
Bohdan-Kim committed Nov 22, 2024
1 parent 3e2d6d2 commit a8f844c
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,4 @@ interface NetworkDispatcher {
onSuccess: (String) -> Unit,
onError: (Throwable) -> Unit
)

fun setLoggingEnabled(enabled: Boolean)
}
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,7 @@ class GBSDKBuilder(
return GrowthBookSDK(
gbContext,
refreshHandler,
networkDispatcher.apply {
setLoggingEnabled(enableLogging)
}
networkDispatcher,
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ class MockNetworkClient(
onError(ex)
}
}

override fun setLoggingEnabled(enabled: Boolean) = Unit
}

class MockResponse {
Expand Down
2 changes: 1 addition & 1 deletion NetworkDispatcherKtor/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {
}

group = "io.growthbook.sdk"
version = "1.0.2"
version = "1.0.3"

kotlin {
android {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,11 @@ class GBNetworkDispatcherKtor(
/**
* Ktor http client instance for sending request
*/
private val client: HttpClient = createDefaultHttpClient()
private val client: HttpClient = createDefaultHttpClient(),

private var enableLogging: Boolean = false,
) : NetworkDispatcher {

private var enableLogging = false

/**
* Function that execute API Call to fetch features
*/
Expand Down Expand Up @@ -161,7 +160,7 @@ class GBNetworkDispatcherKtor(
}
}

override fun setLoggingEnabled(enabled: Boolean) {
fun setLoggingEnabled(enabled: Boolean) {
enableLogging = enabled
}

Expand Down
2 changes: 1 addition & 1 deletion NetworkDispatcherOkHttp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
}

group = "io.growthbook.sdk"
version = "1.0.1"
version = "1.0.2"

kotlin {
android {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,11 @@ class GBNetworkDispatcherOkHttp(
/**
* Ktor http client instance for sending request
*/
private val client: OkHttpClient = OkHttpClient()
private val client: OkHttpClient = OkHttpClient(),

private var enableLogging: Boolean = false,
) : NetworkDispatcher {

private var enableLogging = false

/**
* Function that execute API Call to fetch features
*/
Expand Down Expand Up @@ -152,7 +151,7 @@ class GBNetworkDispatcherOkHttp(
}
}

override fun setLoggingEnabled(enabled: Boolean) {
fun setLoggingEnabled(enabled: Boolean) {
enableLogging = enabled
}
}
Expand Down

0 comments on commit a8f844c

Please sign in to comment.