Open Fabilin opened 7 months ago
I think the maven plugin has 'addCompileSourceRoot' you can set to false and not add targetDirectory to the sources in the first place but the gradle one doesn't (or does it?).
I do the generation on one module (A) but set the targetDir to another (B) and get "Duplicate content root detected" warnings on InteliJ, .. but with Visual Studio Code's Java plugin... it gets messed up totally and shows red squiggly lines everywhere. .. because it added module B's generated source to module A
My workaround is keep the generated files in module A, create another task in module A that copies the contents of targetDirectory (in A) to module B
The jsonschema2pojo gradle plugin automatically attaches the generated files to the main sourceset of a project. However, some projects may wish to add generated sources to a separate sourceset, or even to generate them without using them as sources at all. As such, it would be helpful to add a (nullable)
sourceSet
variable to the plugin's configuration, which could default to themain
sourceset.