This message was deleted.
# plugin-development
s
This message was deleted.
t
How do you configure your generation task?
g
I write sources in the output classe dir of the main / test source set, using a DirectoryProperty would fix the implicit dependency ?
n
I think it would be better to have these sources generated in their own output directory and just add it to the output of the sourceset instead (you can use
builtBy
to manage the task dependency if necessary). e.g.
Copy code
sourceSets {
    main {
        output.dir(generatedResources, "builtBy" to "generationTask")
    }
}
In general I believe it's not advisable to reuse the same output dir for multiple tasks.
j
Are you generating
java
files or
class
files? For
class
files something like ☝️ should work
For
java
files it should be something like this:
Copy code
sourceSets.main {
    java.srcDir(myGenerationTask)
}
👍 1
t
An example (not pretty, but still illustrates this ; note that the modification of classpaths is specific to GWT, which needs the source files as resources too): https://github.com/gwtproject/gwt-places/blob/master/processor/gwtTest.gradle.kts
g
Thanks for all those answer, I'm generating java file, I will try that