I am not seeing the behaviour you are.
I copied your list* tasks into my project and I see the transitive deps of
project lib dependencies added to the compile configuration present in the
runtime configuration.
On 15/08/2010, at 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?
>
> Cheers,
> Matthias
>
> By the way, my real goal is to use configurations.runtime.resolve() to find
> all the files I need to put into the manifest classpath of my main() program.
>
> ---
>
> Am 14.08.2010 um 02:19 schrieb Luke Daley:
>
>> Yes, that's exactly right.
>>
>> On 14/08/2010, at 8:26 AM, Matthias Bohlen <[email protected]> wrote:
>>
>>> Hi,
>>>
>>> could somebody please explain the gradle dependency mechanism?
>>>
>>> If I declare this inside project A:
>>>
>>> dependencies {
>>> compile project(':B')
>>> }
>>>
>>> and then I declare this in project B:
>>>
>>> dependencies {
>>> compile project(':C')
>>> runtime project(':D')
>>> }
>>>
>>> will the compile classpath for project A contain B and C, too? And how
>>> about the runtime classpath of A, will it contain B, C and D?
>>>
>>> Cheers,
>>> Matthias
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>> http://xircles.codehaus.org/manage_email
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>> http://xircles.codehaus.org/manage_email
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email