On 24/02/2011, at 4:04 AM, Merlyn Albery-Speyer wrote:

> Thanks for this, Peter. It's very helpful information.
> 
> On Wed, 2011-02-23 at 08:35 -0800, Peter Niederwieser wrote: 
>>> I have a plugin I'm working on, and as far as I can tell I can't make a
>>> multiproject build where one subproject consumes the plugin artifact
>>> generated by the other subproject.
>>> 
>> 
>> I think that putting the plugin artifact on the other script's class path
>> (with a buildscript {} section) should work.
> 
> Hmm. It sounds like you're saying that the evaluation of subproject A
> can depend on the execution of a task in subproject B. I didn't think
> that was possible. 
> 
>>> Perhaps the gradle developers could shed some light on this. Which
>>> versions
>>> of the gradle java and groovy plugins does the gradle project itself
>>> consume
>>> during a build?
>>> 
>> 
>> Before Gradle's integration tests are run, a full distribution is built,
>> which will then be used by the integration tests. So the tests will always
>> use the latest Java and Groovy plugins.
> 
> So for me there's good news and bad news. The bad news is that there's
> no magic to make this a simple matter of configuring my build script.
> The good news is that there are some gradle-core integration test
> support classes.
> 
> For anyone else wanting to integration test their plugins, take a look
> at the org.gradle.integtests package in gradle-core - particularly
> org.gradle.integtests.fixtures. And for examples of their usage look at
> the gradle integ-test subproject.

Just be aware that these are currently internal classes. This means they may 
change or disappear at any time. Instead, you should try to use the 
ProjectBuilder class, which is part of the public API, and is included in the 
published Gradle JARs (and is documented, tested, and so on).

Over time, we will move more stuff from the internal classes to the public 
testing API.


--
Adam Murdoch
Gradle Developer
http://www.gradle.org
CTO, Gradleware Inc. - Gradle Training, Support, Consulting
http://www.gradleware.com

Reply via email to