Hi, is it possible to add all ksp configurations i...
# koin
j
Hi, is it possible to add all ksp configurations in convention plugin? Because it cannot find configurations other than
kspCommonMainMetadata
. Not sure if this belongs here in the channel as it includes multiple topics
Copy code
plugins {
    id("com.google.devtools.ksp")
}

ksp {
    // enable compile time check
    arg("KOIN_CONFIG_CHECK","true")
    // disable default module generation
    arg("KOIN_DEFAULT_MODULE","false")
}

val libs = the<LibrariesForLibs>()
dependencies {
    add("kspCommonMainMetadata", libs.koin.ksp.compiler)
    add("kspAndroid", libs.koin.ksp.compiler)
    add("kspIosX64", libs.koin.ksp.compiler)
    add("kspIosArm64", libs.koin.ksp.compiler)
    add("kspIosSimulatorArm64", libs.koin.ksp.compiler)
}
1
p
It's not a KOIN issue. I guess by reading https://kotlinlang.org/docs/ksp-multiplatform.html#avoid-the-ksp-configuration-on-ksp-1-0-1 I guess in the future it will be removed.
j
As I understand it, it only mentions ksp(...), not add(...), which I'm using.
p
I was hopping add is included hehehhe Cus I hate the boiler plate code that we need to do plus if also need it to use in Test you need more config.
j
Well yes, it works when this is added in all modules
Copy code
dependencies {
    add("kspCommonMainMetadata", libs.koin.ksp.compiler)
    add("kspAndroid", libs.koin.ksp.compiler)
    add("kspIosX64", libs.koin.ksp.compiler)
    add("kspIosArm64", libs.koin.ksp.compiler)
    add("kspIosSimulatorArm64", libs.koin.ksp.compiler)
}
but I wanted to apply it from the convention plugin only once