KSP2: Compatibility with other code generators wired to generatedKotlin (KGP 2.3+)
Open
Gradle
P4
- Dominant language
- Kotlin
- Stars
- 3.5k
- Forks
- 415
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 53
Description
I have a Kotlin code generator producing Kotlin source code stored in a directory wired to the `kotlin.sourceSets.main.generatedKotlin.srcDir(myTask)`.
I have a (manually written) class in the `main` sourceSet that refers to a generated class located in the `generatedKotlin` srcDir, but ksp2 can't resolve this class.
When I change my code generator to use the old `kotlin` SourceDirectorySet via `kotlin.sourceSets.main.kotlin.srcDir(myTask)`, ksp2 works as expected.
How does ksp2 interact with the new generatedKotlin SourceDirectorySet? Or does KGP do not pass the `generatedKotlin` sources to ksp2?
KSP: 2.3.4
Kotlin: 2.3.0
Platform: JVM
Contributor guide
Assessment
This issue has not been assessed yet.