https://kotlinlang.org logo
Title
m

Matthias Geisler

05/01/2022, 6:17 PM
Just an Observation I'd like to share - if I generate for example for commonTest something, neither
getNewFiles
nor
getAllFiles
picks them up - I believe this has to do with the fact that meta/shared sources (except commonMain) cannot be declared for KSP right?
e

efemoney

05/02/2022, 12:00 PM
Its not immediately clear what your setup is. Can you please clarify? Are you running ksp on your (common) main, generating code in your (common) test and expecting ksp to pick that up in your main ksp as newFiles? 🤔
m

Matthias Geisler

05/02/2022, 12:14 PM
I am running KSP to generate arbitrary (meta) test sources...only thing I want to confirm that KSP "only" covers with
getNewFiles
all files under
build/ksp/generated
which are delegated via
dependency { add("ksp...", ...) }
and does not cover stuff which is not delegated...
For example I generate something for
mobileTest
it will not show up with
getNewFiles
...but if I put it under
jvmTest
it does
j

Jiaxiang

05/02/2022, 7:22 PM
where does
mobileTest
come from? Might be easier to see with the whole project build script.
m

Matthias Geisler

05/02/2022, 8:04 PM
You may find a full example here for sharedSources and the actual project which actually uses KSP here.
GradlePlugin of KMock takes care about KSP
And we also discussed the generation of arbitrary shared/meta sources here.
j

Jiaxiang

05/03/2022, 5:25 PM
Thanks for the pointer, I need more time to catch up on the thread, will reach you back when I got time.
m

Matthias Geisler

05/03/2022, 5:54 PM
Sure