Having the different sub-directories makes a lot of sense.  I suppose to more 
closely match the maven default directory structures that something like this 
would be more "compliant":

build/generated-src/main/java
build/generated-src/main/resources

or 

build/generated/src/test/java
build/generated/src/test/resources

I would tend to also think that the generated sources makes the most sense, 
especially since some IDEs like to instrument the code being compiled (or 
adjusting it in some other manner logically just before compilation).

-Spencer

--- On Tue, 5/10/11, mraccola <[email protected]> wrote:

From: mraccola <[email protected]>
Subject: [gradle-dev] Re: using generated resources in the IDE
To: [email protected]
Date: Tuesday, May 10, 2011, 9:40 AM

I can buy that....generating to the build directory.  There are two remaining
points then: 

1) Should the files be generated to their own separate directories?

My opinion is an emphatic "yes".  How about something like:

build/codeGen/main/java -- Generated production Java source
build/codeGen/main/resources -- Generated production resources
build/codeGen/test/java -- Generated test java source
build/codeGen/test/resources -- Generated test resources

2) Should the folder which is added to the IDE contain the generated source
or the classes compiled from the generated source?

My opinion is "the generated source".  This allows the IDE to fully control
the compilation and/or processing of the source files.  I would think it
would also simplify the internal Gradle architecture since, once these
additional directories are added to the sourceSet, they don't need any
special handling to compile/process them.  The existing compileJava*** and
process***Resources tasks can handle them.

--
View this message in context: 
http://gradle.1045684.n5.nabble.com/using-generated-resources-in-the-IDE-tp4363800p4384473.html
Sent from the gradle-dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to