Hi Jan,

As far as I'm aware, you can't have a root project that contains a
subproject that's setup to be a root project itself. Can you not depend
on the artifacts generated by the subproject instead?

Cheers,
Merlyn

On Mon, 2011-05-23 at 14:48 +0200, Jan Ahrens wrote:
> Hi,
> 
> I'm trying to setup a multi-project build, that includes a subproject,
> which has it's own build.gradle, and itself a couple of dependencies.
> 
> The problem is that the subproject, that I'm trying to include, has also
> sub-projects and dependencies between those sub-projects.
> 
> The dependencies are prefixed with a 'colon', and treated by gradle as
> if they were directly located as children of the main project, which
> they are not.
> 
> The subproject, that I'm trying to include is the 'Spock Framework' [0]
> and the project layout is like this:
> 
> /
>   build.gradle
>   settings.gradle
>   spock/
>     build.gradle
>     settings.gradle
>     spock-core/
>        build.gradle
>        settings.gradle
>     spock-specs/
>        build.gradle
>        settings.gradle
> 
> Contents of '/settings.gradle':
> --- BEGIN ---
>   include 'spock'
>   include 'spock:spock-core'
>   include 'spock:spock-specs'
> --- END ---
> 
> The reason why I'm including 'spock:spock-core' in '/settings.gradle' is
> that I'm needing that dependency for the root project.
> 
> The dependency configuration in '/spock/spock-specs/build.gradle':
> --- BEGIN ---
>   dependencies {
>     testCompile project(':spock-core') // line 6
>     // ...
>   }
> --- END ---
> 
> When trying to build the root project, I'm getting the following error
> message.
> --- BEGIN ---
>   * Where:
>   Build file '/spock/spock-specs/build.gradle' line: 6
> 
>   * What went wrong:
>   A problem occurred evaluating project ':spock:spock-specs'.
>   Cause: Project with path ':spock-core' could not be found in project
>     ':spock:spock-specs'.
> --- END ----
> 
> My question is: How am I supposed to include the sub-project 'spock' in
> a way that gradle knows that the colon in the 'spock' folder means
> another 'root'. Is there a notation for relative project-paths?
> 
> Thanks,
>  Jan
> 
> [0] https://github.com/spockframework/spock
> 
> ---------------------------------------------------------------------
> 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


Reply via email to