This from the gradle users list might help:
http://gradle.markmail.org/thread/fiy7lycws3fmqf52

Philip

On Thu, Aug 19, 2010 at 12:33 PM, Matthias Bohlen <[email protected]>wrote:

> Hi,
>
> today, I created a separate source set for generated code:
>
> sourceSets {
>     main {
>         java {
>             srcDirs = [ 'src/main/java' ]
>         }
>     }
>     generated {
>         java {
>             srcDirs = [ 'src/generated/java' ]
>         }
>     }
> }
>
> I did this because I do not want to run Checkstyle on the generated code,
> so I also said:
>
> checkstyleGenerated.enabled = false
>
> However, the compileJava task does not seem to know about the second source
> set because I get compile errors when a symbol is referenced that is defined
> in the generated code.
>
> So: How do I add the "generated" source set to the compile and jar tasks?
>
> Cheers
> Matthias
>
>

Reply via email to