When using ksp in a multiplatform project, is it possible to know which target is used when ksp code is ran?
I target jvm, ios and js with this configuration:
dependencies {
add("kspCommonMainMetadata", project(":processor"))
add("kspJvm", project(":processor"))
add("kspJvmTest", project(":processor"))
add("kspJs", project(":processor"))
add("kspJsTest", project(":processor"))
add("kspIosX64", project(":processor"))
add("kspIosX64Test", project(":processor"))
}
I end up with a lot of
Redeclaration: MyClass
since all classes under
generated/ksp/js
,
generated/ksp/jvm
and
generated/ksp/ios
have the same package
com.jeantuffier.somePackage
.
I’m using this to generate the package line of each file
val packageName = classDeclaration.packageName.asString()
. Is it possible to append it with
jvm
,
ios
or
js
based on the target?