Can you please update the official KSP Multiplatfo...
# ksp
d
Can you please update the official KSP Multiplatform documentation page? WARNING: what I suggest here is not exactly correct - read my next message in the thread It currently does not: • explain that you need to add this
Copy code
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().all {
  if (name != "kspCommonMainKotlinMetadata") {
    dependsOn("kspCommonMainKotlinMetadata")
  }
}
to your build to make any kotlin compilation task depends on the common kotlin metadata • instruct on adding
Copy code
kotlin {

  sourceSets {
    commonMain {
      kotlin.srcDir("build/generated/ksp/metadata/commonMain/kotlin")
    }
  }
}
to the build to make the generated code available in
commonMain
• it say nothing about the current limitations that makes it not possible to have generated code in intermediate sourcesets like
iosMain
I’d also like to know which issues I should follow to know about progresses in this regard. Thank you!
1
Actually, after further investigation I’ve seen the things are more complicated than this. setting up common ksp like I suggested in my main message AND target ksp is going to create conflicts as the classes are going to generated twice. Therefore those 2 things are exclusive. This also mean that you cannot directly use generated code in intermediate targets It’s quite a major limitation and possibly the top priority issue I have with kotlin multiplatform. And I think the official documentation should be clearer on this: I’ve understood this only by reading kotlin-inject documentation.