Hi Allan,

On Jul 8, 2008, at 3:35 AM, Allan Lewis wrote:


Hi,

This seems so simple that I'm probably being dense, but I can't see what I'm
doing wrong.  I have a project defined as follows:

project (':foo') {

        dependencies {
                compile 'org.springframework:spring:[EMAIL PROTECTED]'

}

Later on in the same build.gradle, I have another project:

project (':bar') {
        
        dependencies {
                compile project(':foo')
        }

}

I'm currently getting an error compiling any classes that have Spring
dependencies in the 'bar' project.  Shouldn't project 'bar' be able to
compile classes with Spring dependencies based on the above? Shouldn't
'bar' be inheriting the spring jar through the 'foo' lib dependency?

For runtime yes, for compile time no. I think this is a very important feature of Gradle. For example yesterday I got a compile error because I have refactored some Groovy classes to Java. Therefore I could not use the Groovy AntBuilder in this classes any longer but had to use the Ant classes directly. The compile failed although Ant is in the transitive classpath. But Gradle has informed me (via the compile failure) that I have a new first level dependency which needs to be declared explicitly. See also the discussion in 12.1.2 in the user's guide.

- Hans

--
Hans Dockter
Gradle Project lead
http://www.gradle.org





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

   http://xircles.codehaus.org/manage_email


Reply via email to