On 02/07/2011, at 9:52 AM, Luke Daley wrote:

> 
> On 02/07/2011, at 5:59 AM, Adam Murdoch wrote:
> 
>> On 01/07/2011, at 10:27 PM, Luke Daley wrote:
>> 
>>> Hi guys,
>>> 
>>> One of the ways the signing plugin works is that you can specify that a 
>>> configuration's artifacts can be signed. Currently there is no way to 
>>> lazily do this, i.e. only the artifacts that exist as part of this 
>>> configuration at the time you specify you want to sign it will be signed.
>>> 
>>> One way to solve this would be to add a listener mechanism for 
>>> addition/removal of artifacts to a configuration. It might make sense to 
>>> add this for dependencies too.
>> 
>> The plan is to have Configuration.getDependencies() and getArtifacts() 
>> return a DomainObjectCollection instead of a Set. This will give you ways to 
>> listen for artifacts and dependencies being added, plus some other DSL 
>> goodness. To make this change in a backwards compatible way, we should also 
>> change DomainObjectContainer to extend Set, or possibly Collection. Last 
>> time I tried this, I ran into some Groovy weirdness which completely broke 
>> the DSL. It might be worth a try again, now.
>> 
>> Another option is to add some additional properties to Configuration which 
>> return the backing DomainObjectCollection
> 
> 
> Given that a configuration is collection of two things; dependency and 
> publish artifact, we might have to expose separate DomainObjectCollections 
> for each of those two types.

Absolutely. Configuration.getDependencies() returns a collection 
(DomainObjectCollection) whose elements are of type Dependency. 
Configuration.getArtifacts() returns a collection whose elements are of type 
PublishArtifact.


--
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