On 15/08/10 2:54 AM, Matthias Bohlen wrote:
Thank you, Luke, but on my machine, this does not happen. My build.gradle sounds like this:

dependencies {
compile project(':anotherProjectInTheSameMultiprojectBuild'), fileTree(something...)
    runtime fileTree(somethingElse...)
}

task listCompile(dependsOn: configurations.compile) << {
println "compile classpath = ${configurations.compile.resolve().collect {File file -> file.name}.sort()}"
}

task listRuntime(dependsOn: configurations.runtime) << {
println "runtime classpath = ${configurations.runtime.resolve().collect {File file -> file.name}.sort()}"
}

When I type "gradle listCompile", the list of printed file names contains about 100 items. When I type "gradle listRuntime", the list of printed file names contains about 10 items.

It turns out that the dependencies of "anotherProjectInTheSameMultiprojectBuild" are transitively contained in configurations.compile but *not* in configurations.runtime. In configurations.runtime, I only see the jar file from "anotherProjectInTheSameMultiprojectBuild", the files from "something" and from "somethingElse".

It does not matter whether I set configurations.compile.transitive=true or =false.

I am using gradle-0.9-rc-1.

What am I missing? In my opinion, when I compile against something, it *must* also be on the runtime classpath, mustn't it?

That's right, that's how it's supposed to work. I think you're running into an ordering problem, as I mentioned in another email.


--
Adam Murdoch
Gradle Developer
http://www.gradle.org
CTO, Gradle Inc. - Gradle Training, Support, Consulting
http://www.gradle.biz


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

   http://xircles.codehaus.org/manage_email


Reply via email to