Hey, is this possible to launch the generation onl...
# ksp
a
Hey, is this possible to launch the generation only for Unit Testing such as testImplementation() or kspTest() ?
m
Looks like it's more
Copy code
ksp.allow.all.target.configuration=false
in your gradle.properties
🎉 1
a
looks like it's already false as I'm on ksp2 but I'll try the kspTest
🎉 1
👍 1
Thanks I managed what I wanted to do but I have another question following. I will post it on the main thread
👍 1
Can we force the lib to be solely for tests and usable only with kspTest() ?
m
Can you elaborate? What lib?
a
Sorry I was thinking about my KSP lib. Is it possible to force it to be only usable with kspTest when adding it in the app ?
m
There's no really such thing as a KSP lib. There's a processor and generated code
If you want the generated code to be only usable from test then you should add your processor to the kspTest configuration
a
yeah OK. So if someone wants to use it on prod code there is no way to restrict it, right ?
What I meant was if I was to put my processor on a public github repository, there is no way of restricting it to using it only on tests. But I think I have the answer, thanks for everything
👍 1
m
Oh yea, your processor knows nothing about what source set it is used with
👍 1