After updating my code to newer kotlin versions, I'm getting the following error:
e: Files '/.../build/generated/ksp/backend/backendMain/kotlin/com/martmists/bbsp/database/model/CardGraphQL.kt', '/.../build/generated/ksp/backend/backendMain/kotlin/com/martmists/bbsp/database/model/UserGraphQL.kt' can be a part of only one module, but is listed as a source for both `backendMain` and `generatedByKspKotlinBackend`, please check you -Xfragment-sources options.
This was previously not an issue, how would I resolve it? I can't find any results for
-Xfragment-sources
in the docs or on google, and I add the code with
sourceSets {
val backendMain by getting {
kotlin.srcDir(buildDir.resolve("generated/ksp/backend/backendMain/kotlin"))
// ...
I can make the error go away by replacing that srcDir line with
afterEvaluate { dependsOn(getByName("generatedByKspKotlinBackend")) }
, but then it fails to compile as both sources recursively depend on each other. Previously this wasn't an issue, as they were both in the same sourceset