On 04/09/2011, at 10:46 AM, ansel1 wrote:

> I've looked at those.  The trouble I'm having is that sourceSets supports 
> additions from otherwise decoupled plugins.  But in the case of a simple, 
> scalar value, it's not clear how to have two plugins provide the value in a 
> way that keeps trying different plugins until one is successful.

There's no baked-in support for this. I guess there are a few options:

* Each plugin sets the value when it is applied (last applied wins). Or as a 
variation, sets the value if it is null (first applied wins).
* Each plugin registers a provider (as a Closure or Callable or whatever), and 
the convention object iterates over until these until it finds one that returns 
a non-null value.

This might be something useful to add to the convention mapping stuff, where 
you can chain the mappings for a property. But first, we'd need to make the 
convention mapping stuff public.


--
Adam Murdoch
Gradle Co-founder
http://www.gradle.org
VP of Engineering, Gradleware Inc. - Gradle Training, Support, Consulting
http://www.gradleware.com

Reply via email to