Alexander Ioffe
08/04/2025, 4:07 AMkotlin {
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???