Actually, what you are doing is the correct thing.  It's not a Gradle issue
so much as a Groovy compiler issue -- to cross-compile between Java and
Groovy when there are references back and forth (as you have), the Groovy
compiler has to handle compiling both Java and Groovy sources.  Gradle does
this when all your code lives under src/*/groovy as you said.  I do suspect
you could tell Gradle to use both src/main/java and src/main/groovy as the
Groovy source directories, but that would seem confusing anyway, since
people could put .groovy files in src/main/java and .java files in
src/main/groovy and everything would continue working.


On Thu, Apr 22, 2010 at 8:08 PM, Roger Studner <[email protected]> wrote:

> This is a problem i'm sure has been solved over and over.. I just can't =
> find it via da googles :)
>
> src
> main
>  java
>  com
>   AClass
>   BClass
>  groovy
>  com
>   SomeOtherClass
>
> SomeOtherClass refers to AClass.. but BClass refers to SomeOtherClass
>
> Since it performs compileJava and then compileGroovy, it is a chicken =
> and egg problem.
>
> Right now I solve this by putting 100% of my code under src/main/groovy
>
> i'm guessing this is a sourceSet issue, or a way to include things on =
> the classpath (one or the other).
>
> Thanks!
>
> Roger
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>


-- 
John Murph
Automated Logic Research Team

Reply via email to