Adam Murdoch wrote:


Steve Ebersole wrote:
Ok, got past that (thanks to much help from Jason on IRC):

compileJava {
    options.fork(executable: '/opt/java/jdk-1.6/bin/javac')
}

However, I am not able to get the dependencies to work properly.  It
works fine if I just do:

dependencies {
    compile project(':core')
}

But that gives trouble later when I go to do:

jar {
    from { project(':jdbc3').sourceSets.main.classes }
    from { project(':jdbc4').sourceSets.main.classes }
}

complaining about:
* What went wrong:
Circular dependency between tasks. Cycle includes task
':core:uploadDefaultInternal'.


That's right. A project dependency uses the jar from the target project. In your case, the jar need the classes from the other projects, which in turn need the jar in order to be compiled.

I wonder if it would be better for a project compilation dependency to use the classes of the target project, rather the jar of the target project. It would certainly help in your case.

It would also help more generally for projects where multiple projects are aggregated into a single jar file, as we wouldn't need to build a bunch of intermediate jars which are not actually used in a distribution.


--
Adam Murdoch
Gradle Developer
http://www.gradle.org


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

   http://xircles.codehaus.org/manage_email


Reply via email to