Pavel S
08/30/2023, 10:11 AMinterface MyInt
will produce fun MyInt(): MyInt {...}
which is located in the same package as the interface. The problem is that IDE doesn’t see the generated functions and gives a warning that “Interface doesn’t have constructors” when using them, but the functions can be found in build/generated/ksp
and the code compiles successfully. Is there a way to make IDE detect it?Pavel S
08/30/2023, 11:39 AMcommonMain
but only per platform, so it can’t be resolvedPavel S
08/30/2023, 11:46 AMdependencies {
add("kspCommonMainMetadata", "[my-processor]")
}
kotlin.sourceSets.commonMain {
kotlin.srcDir("build/generated/ksp/metadata/commonMain/kotlin")
}
tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinCompile<*>>().configureEach {
if (name != "kspCommonMainKotlinMetadata") {
dependsOn("kspCommonMainKotlinMetadata")
}
}
See issue