https://kotlinlang.org logo
Title
h

Hayden Meloche

12/05/2021, 2:12 AM
What would be the recommended way to copy a source code file from a KSP project into the generated sources folder of a project consuming my plugin?
e

evant

12/05/2021, 2:17 AM
Make it a normal dependency?
b

Big Chungus

12/05/2021, 3:08 AM
When your gradle plugin registers, you can inject your ksp module as a dependency to relevant sourceSet. Both needs to be published before this works. However this is a bit intrusive and not a standard practice. Usually you expect a user to applu your plugin, apply ksp plugin and add your processor as ksp dependency to relevant sourceSet.
t

Tyler Hodgkins

12/06/2021, 6:04 PM
If the KSP project is the project where you define the generator, you could always have your generator explicitly generate that file.