-
Notifications
You must be signed in to change notification settings - Fork 276
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
How to generate code across sourcesets #799
Comments
KSP follows compilation model in Gradle where main and test source sets are compiled separately. So there is no way (that I know of, without hacking Gradle too much) to process main sources together with the test sources. If you have control over the processor, maybe get symbols in main via |
Is this similar to my question here? |
Yes it does look like we want to achieve the same thing |
I'm trying to generate some code for my tests based on the code in my
main
sourceset.If I apply my Processor to the main source sets, it sees the types I want to, but generates the output in the same sourceset, which I don't want because it's not relevant for production, and also it's missing some dependencies which are only available in test.
Is there a way to do so either in my processor implementation or in the project where I apply it? I'm using Gradle, and so far here's how it works
The text was updated successfully, but these errors were encountered: