Hello,

I have the following project, which I've added to compose a distribution
archive:

project(':project-distribution') {

    configurations {
       binaries
       sources
       javadocs
    }

    dependencies {
       binaries project(path: ':project', configuration: 'default')
       sources project(path: ':project', configuration: 'sources')
       javadocs project(path: ':project', configuration : 'javadocs')

       binaries project(path: ':project-browser', configuration: 'default')
       sources project(path: ':project-browser', configuration: 'sources')

       binaries project(path: ':project-example-simple', configuration:
'default')
       sources project(path: ':project-example-simple', configuration:
'sources')
    }
}

project-distribution/build.gradle:

task prepareDistribution() << {
   copy {
      from configurations.binaries
      into 'build/dist'
   }
   copy {
      from configurations.sources
      into 'build/dist/sources'
   }
   copy {
      from configurations.javadocs
      into 'build/dist/javadoc'
   }
}
task buildDistribution(type: Zip, dependsOn: prepareDistribution) {
   from 'build/dist'
}
build.dependsOn buildDistribution


project-example-simple does produce both jar and sourcesJar and assigns
sourcesJar to the corresponding configuration. 

The problem is that this "project-distribution" is always ran _before_
"project-example-simple", in lexicographical order, ignoring all the
dependencies! All projects (except for root) are of type 'java'. Adding
explcit "dependsOn(':project-example-simple')" does not help.

Here the output of the build (relevant part):

:project-distribution:prepareDistribution
:project-distribution:buildDistribution
:project-distribution:compileJava UP-TO-DATE
:project-distribution:processResources UP-TO-DATE
:project-distribution:classes UP-TO-DATE
:project-distribution:jar
:project-distribution:sourcesJar
:project-distribution:assemble
:project-distribution:check
:project-distribution:build
:project-example-simple:compileJava
:project-example-simple:processResources UP-TO-DATE
:project-example-simple:classes
:project-example-simple:jar
:project-example-simple:sourcesJar
:project-example-simple:assemble
:project-example-simple:check
:project-example-simple:build

Is this a known problem? Any workarounds (except for managing dependencies
by renaming projects)? 

--
View this message in context: 
http://gradle.1045684.n5.nabble.com/Gradle-does-not-honor-dependencies-in-multi-module-project-tp4329149p4329149.html
Sent from the gradle-user mailing list archive at Nabble.com.

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

    http://xircles.codehaus.org/manage_email


Reply via email to