there’s any way to use specific library in debug o...
# multiplatform
h
there’s any way to use specific library in debug or release build type ? In my case, in debug i use
_libs_._chuckerLibrary_
otherwise in release i use
libs.chuckerLibraryNoOp
h
thanks 😘
is there any example for this ? the above link make me a little bit confused
e
just use it the same way you would have used
androidMain
, e.g.
Copy code
kotlin {
  sourceSets {
    invokeWhenCreated("androidDebug") {
      dependencies {
        implementation(libs.chuckerLibrary)
      }
    }
    invokeWhenCreated("androidRelease") {
etc.
🥰 1
h
thank very much, but i can’t import it. Is there any library version i need to upgrade ?
e
what kotlin version are you using?
h
ok thank very much 😘
if i use the below version, is there any way to implement this ?
e
or equivalently,
Copy code
matching { it.name == "androidDebug" }.configureEach {
  dependencies { ... }
}
matching { it.name == "androidRelease" }.configureEach { ... }
or
Copy code
named { it == "androidDebug" }
etc. in Gradle 8.6+
🙌 1
h
ok thx let me try
😞 our project is using gradle
7.5.1
, it seem not working with those functions from methods in above link, please help me again to save my week Y_Y thanks a lot
may u help me plz @ephemient
Y_Y