I noticed that kotlin sources generated in android...
# ksp
e
I noticed that kotlin sources generated in android debug unit tests don’t seem to be visible to the java compiler, which causes the java compilation to fail.
I think I can work around it for now by adding
Copy code
kotlin {
    sourceSets {
        test.kotlin.srcDirs += 'build/generated/ksp/debugUnitTest/kotlin'
    }
}
but it seems like this was an oversight in configuring the source sets in the ksp plugin?
z
Is it solely a java project?
e
no, mixed
repro: • add a ksp processor dependency with kspTest • have the test sources cause the symbol processor to generate kotlin files • have those generated kotlin files referenced by java sources within the test sources • compilation fails with error that the java sources cannot find references to the generated kotlin (compileDebugUnitTestKotlin task)
👍 1
t
Thanks, will try to reproduce and investigate.
🙏 1