:D has…
dependencies {
testCompile project(':C').sourceSets.test.runtimeClasspath
}
If :C hasn't been evaluated yet, project(':C').sourceSets won't be the value
you want (I think it's actually going to silently return null).
That is the sourceSets property is added to the project(":C") during the
evaluation phase by the java plugin, so it has to be evaluated before :D.
It's interesting that my solution didn't work, because it did for me locally… I
think. Adam's is more correct anyway.
On 22/07/2011, at 10:49 PM, Matt Stine wrote:
> Tried both solutions.
>
> Both seem to work - if I change Luke's solution to say
> sourceSets.test.classes rather than output.
>
> Adam - if you don't mind, please explain to me the significance of
> "evaluationDependsOn" in this case.
>
> Thanks!
>
> -Matt
>
> On Thu, Jul 21, 2011 at 10:23 PM, Adam Murdoch
> <[email protected]> wrote:
>>
>> On 22/07/2011, at 8:08 AM, Matt Stine wrote:
>>
>> Hi all-
>>
>> I am in the progress of migrating a legacy project into Gradle.
>>
>> The project is now composed of multiple subprojects...let's call them
>> A, B, C, D, ...
>>
>> I have tests in D/src/test/java that inherit from a class defined in
>> C/src/test/java.
>>
>> What's the most straightforward way to change D's testCompile
>> classpath to see the binaries generated by C's testCompile?
>>
>> In D:
>> evaluationDependsOn(':C')
>> dependencies {
>> testCompile project(':C').sourceSets.test.runtimeClasspath
>> }
>>
>> --
>> Adam Murdoch
>> Gradle Co-founder
>> http://www.gradle.org
>> VP of Engineering, Gradleware Inc. - Gradle Training, Support, Consulting
>> http://www.gradleware.com
>>
>>
>
>
>
> --
> Matt Stine
> Deep South Software: Training, Consulting, Coaching
> http://www.deepsouthsoftware.com
> [email protected]
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
--
Luke Daley
Principal Engineer, Gradleware
http://gradleware.com
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email