Closed erikgunawan closed 1 month ago
"betaImplementation"(libs.chucker)
This is the correct syntax for Kotlin DSL and should work.
"betaImplementation"(libs.chucker)
This is the correct syntax for Kotlin DSL and should work.
It doesn't work, Chucker notification doesn't appear.
It doesn't work, Chucker notification doesn't appear.
Then please provide a reproducer using this template: https://github.com/cortinico/kotlin-android-template
and I'll look into it
"betaImplementation"(libs.chucker)
This is the correct syntax for Kotlin DSL and should work.
Aah my bad, after checking deeply, the issue is because I'm using multi-module architecture (data, domain, app modules).
I call Chucker with the Debug
checker like this:
if (BuildConfig.DEBUG) {
okBuilder.addInterceptor(
Builder(context)
.collector(ChuckerCollector(context))
.maxContentLength(250000L)
.redactHeaders(emptySet())
.alwaysReadResponseBody(true)
.build()
)
}
In the data modules, BuildConfig.DEBUG is always returned false, so the chucker doesn't show. After removing that logic, it works well.
Thanks @cortinico
:writing_hand: Describe the bug
I have 3 build variants: debug, beta, release
Here are the chucker implementations:
And then I tried to migrate the build configuration from Groovy to Kotlin DSL, so I changed the implementations to these:
After that, when building the apps, I got this warning:
I have tried some options, but none of them work
1.
add("beta", libs.chucker)
2.
"betaImplementation"(libs.chucker)