Guilherme Delgado
09/04/2023, 2:55 PMbuild.gradle.kts
configuration:
val iosMain by creating {
dependsOn(commonMain)
dependencies {
// ...
}
}
listOf(iosX64, iosArm64, iosSimulatorArm64).forEach { target ->
getByName("${target.targetName}Main") {
dependsOn(iosMain)
}
val kspConfigName = "ksp${target.name.replaceFirstChar { it.uppercaseChar() }}"
dependencies.add(kspConfigName, "my-ksp-lib")
}
My shared module imports a KSP library to generate code inside iOS targets. It works as expected (image in attach).
However, I’m facing a strange behavior; my generated code cannot see/access what’s in iosMain
(that generated code imports some classes from iosMain
that I need).
What am I doing wrong or missing? Thanks for your time.Guilherme Delgado
09/05/2023, 2:26 AMGuilherme Delgado
09/05/2023, 9:58 AM