On 29 Aug 2014, at 6:37 am, WonderCsabo <kozakcs...@gmail.com> wrote:

> So, for now, this is the task:
> 
> * a class which represents an abstract dependency version
> * a class which parses POM dependency syntax to that abstract version
> * a class which parses 'Gradle' dependency syntax to that abstract version
> * a class which renders that abstract version to POM dependency version
> string
> * a class which renders that abstract version to 'Gradle' dependency version
> string
> * use these to convert 'Gradle' string to POM string in POM publication
> * use these to convert POM string to 'Gradle' string in POM consumption


This is eventually where we want to get to, but this is a lot of work and we 
don’t need to do all or even any of this to fix the pom generation problem. 
Even if we did do all of this, we’d chop it up into small pieces.

So, I’d suggest you start with one of these options:

Option 1. As Daz suggested, just stick with strings for now. Pom generation 
translates gradle strings to maven strings, and pom parsing translates maven 
strings to gradle strings.

or 

Option 2. Very basic VersionSelector implementation:

1. Add VersionSelector and change VersionMatcher to be able to produce these 
(without changing anything else)
2. Change Pom generation to take the gradle string and use VersionMatcher to 
parse the gradle string into a VersionSelector and then generate the maven 
string from this.
3. Change Pom parsing to produce a VersionSelector from a maven string and then 
generate the gradle string from this.

This way, we can introduce the concept and start using it, and then gradually 
decouple dependency declarations from the different formats internally.


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



Reply via email to