When I enable KSP on a KMP project (Android/JS/......
# ksp
g
When I enable KSP on a KMP project (Android/JS/...) and I run only
compileTestKotlinJs
it somehow triggers the task
kspReleaseUnitTestKotlinAndroid
. Any idea why it's linked? Is it an expected behavior?
t
Can you run a build scan to see how the dependency is introduced? https://scans.gradle.com/
g
I think I can't reorder gradle targets so I may have to fork MocKMP and change a bit the patch so that I prefer JVM to Android (maybe a PR if it's accepted).
m
That sounds more like something misfires...the compiler for Js and Jvm are separated...
KMock for example is totally fine to generate things for arbitrary SourceSets (with a bit of additional Gradle Magic)
g
Interesting, thanks! May it be an old requirement? IIRC Mockmp has been written on KSP 1.0, almost the same time you started kmock right?
Also I'm seeing this trick here, may it be related?
m
TBH, I started KMock after MocKMP because I was a bit disappointed
And the trick is not related directly...it is only about order of execution...here is the counterpart.