Philip Crotwell wrote:
Hi
One of the reasons I wanted to move away from maven (and hopefully to
gradle) was that I have a rather large java multiproject, with lots of
dependency jars, and keeping everything up to the same level was a
pain without transitive dependencies. But from what I can tell from
the userguide and my testing, gradle does not do transitive dependency
between projects. Is this true?
It's not true. Gradle does transitive dependencies between projects.
The 'compile' configuration is special, in that it is set up to be
non-transitive by default. We feel that it's better to list all your
direct dependencies for compilation. It's very easy to override this
default, if you'd rather have transitive compilation dependencies:
configurations.compile.transitive = true
For example, if I have projects A, B, C, D, etc with each depending on
the previous like B/build.gradle having:
dependencies {
compile project(':A') { transitive = true }
}
and C/build.gradle having
dependencies {
compile project(':B') { transitive = true }
}
This doesn't work, because the transitive = false setting on the compile
configuration overrides the transitive = true setting on the dependency.
If you set transitive = true on the compile configuration, you won't
need to do so on each individual dependency.
Adam
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email