Question on the KSP documentation <here>. The docu...
# ksp
a
Question on the KSP documentation here. The documentation seems to indicate that if you want KSP processing to be done in a KMP project on (for example) both commonMain and jvmMain you use the following configuration:
Copy code
kotlin {
    jvm()
    ...
    sourceSets {
        val commonMain by getting { ... }
        val jvmMain by getting { ... }
    }
}

dependencies {
    add("kspCommonMainMetadata", project(":my-processor"))
    add("kspJvm", project(":my-processor"))
}
In practice however, this seems to blow up my build by generating the same code in commonMain twice! The first time in
MyProject/build/generated/ksp/metadata/commonMain/kotlin
and the second in
MyProject/build/generated/ksp/jvm/jvmMain/kotlin
. Now to be fair, if I have some class in jvmMain it will only appear in the latter location but why is everything from the commonMain directory also there???