-
Notifications
You must be signed in to change notification settings - Fork 294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kspTestKotlin output seems to clobber kspKotlin output #157
Comments
I did another test, and I can confirm that any invocation of When I manually add a subdir, e.g. Additionally, when I print the output dirs for the different withType<com.google.devtools.ksp.gradle.KspTask> {
println(name)
outputs.files.forEach { println(it.absolutePath) }
} |
When I do the same for tasks of type |
Could it be that this causes it? ksp/gradle-plugin/src/main/kotlin/com/google/devtools/ksp/gradle/KspSubplugin.kt Line 112 in 64e7f0f
|
Please have a look at #158. It addresses the issue for me, but I am not sure if this is the right way to adress this. |
A |
I have two classes annotated with the same annotation. One in the main sourceset, one in the test sourceset.
In my processor, I use
CodeGenerator
to write the generated output files.If I run only
kspKotlin
, the generated output is correctly placed inbuild/generated/ksp/src/main/kotlin/packagename/SomeFile.kt
If I subsequently run
compileKotlin
, the.class
file for SomeFile.kt is correctly placed in thebuild/classes
dir hierarchy. The generated source is untouched.Now when I run
kspTestKotlin
, the generated source for the test sourceset is correctly placed inbuild/generated/ksp/src/xitest/kotlin/packagename/SomeTestFile.kt
Unfortunately the previously generated source for the main sourceset at
build/generated/ksp/src/main
is removed. Even the wholemain
subdir is removed. This not causing problems for running the code, since the.class
files remain, but the IDE can now no longer find the source, which is very inconventient.I did some digging in the code of Ksp, but it is not clear to me why this happens. Could you help me find the cause?
The text was updated successfully, but these errors were encountered: