I'm working through the ivy metadata customisation stuff. I'm wondering where the responsibilities lie for certain things going forward.
Spec for this work is here: https://github.com/gradle/gradle/blob/master/design-docs/publication-model.md What would the responsibility of an upload task be? 1. Upload one or more publications to one or more repositories? 2. Upload one publication to one or more repositories? 3. Upload one publication to one repository? For my money, #3 is the best. It's far simpler and more common, and you can still fulfil #1 and #2 via adding more upload tasks. The immediate question is whether the new Publication concept should be added to: 1. Repository (somehow) 2. Upload I think #2 makes the most sense. All and upload task should be is the glue between a Publication and a Repository, and be the execution point. If we're on track so far, then we have an immediate issue in how to deal with the fact that we abstract over Ivy and Maven. Here's my plan for Ivy: 1. Add setPublication(IvyPublication) to Upload 2. Apply (use to influence what is uploaded) uploadTask.publication to each uploadTask.repositories that is not a MavenResolver 3. Wire publications.ivy to uploadTasks.publication Here's my plan for Maven: 1. Add setPublication(MavenPublication) to MavenResolver 2. Wire publications.maven to the publication of uploadTask.repositories that are MavenResolver This is a bit asymmetric, but it's the least invasive way I can see to get this done. So, there are two public API changes: 1. Add setPublication(IvyPublication) to Upload 2. Add setPublication(MavenPublication) to MavenResolver For #1 it might be better to just make it setPublication(Publication) and do a runtime check for IvyPublication (if it turns out that we need to restrict the type at this point). Does anyone object to this? -- Luke Daley Principal Engineer, Gradleware http://gradleware.com --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
