Actually, I got it working with the /spock/settings.gradle file as well. You
just need to reference the projects from the parent:
[code src=/spock/settings.gradle]
include 'spock:spock-core', 'spock:spock-specs'
[/code]

On Mon, May 23, 2011 at 10:59 AM, Eric Berry <[email protected]> wrote:

> This works fine for me if I get rid of the settings.gradle file under the
> "spock" directory.
>
> [code src=/settings.gradle]
> include 'spock', 'spock:spock-core', 'spock:spock-specs'
> [/code]
>
> [code src=/spock/spock-specs/build.gradle]
> dependencies {
>    testCompile project(':spock:spock-core')
> }
> [/code]
>
> Do you need the /spock/settings.gradle file?
>
>
> On Mon, May 23, 2011 at 5:48 AM, Jan Ahrens <[email protected]> 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
>>
>>
>>
>
>
> --
> Learn from the past. Live in the present. Plan for the future.
> Blog: http://eric-berry.blogspot.com
> jEdit <http://www.jedit.org> - Programmer's Text Editor
> Bazaar <http://bazaar.canonical.com> - Version Control for Humans
>



-- 
Learn from the past. Live in the present. Plan for the future.
Blog: http://eric-berry.blogspot.com
jEdit <http://www.jedit.org> - Programmer's Text Editor
Bazaar <http://bazaar.canonical.com> - Version Control for Humans

Reply via email to