dependencies: version ranges

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

dependencies: version ranges

Marko Bauhardt-3
Hi all,
maven and i think ivy (http://www.jaya.free.fr/ivy/doc/ivyfile/dependency.html 
) supports version ranges.
i dont find something in the userguide from gradle.

but i tried this in my build file

compile ":commons-httpclient:3.0.+"

and gradle gets the jar with the highest version from my local lib  
folder.

-----
      found #commons-httpclient;3.0.7 in lib
         [3.0.7] #commons-httpclient;3.+
----

is this a hidden feature of gradle? supports gradle version ranges?



marko



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: dependencies: version ranges

Xavier Hanin
On Tue, Jul 15, 2008 at 7:45 PM, Marko Bauhardt <[hidden email]> wrote:
Hi all,
maven and i think ivy (http://www.jaya.free.fr/ivy/doc/ivyfile/dependency.html) supports version ranges.
Indeed. And FYI the more recent source of information about Ivy is @ apache:
http://ant.apache.org/ivy/
 

i dont find something in the userguide from gradle.

but i tried this in my build file

compile ":commons-httpclient:3.0.+"

and gradle gets the jar with the highest version from my local lib folder.

-----
    found #commons-httpclient;3.0.7 in lib
       [3.0.7] #commons-httpclient;3.+
----

is this a hidden feature of gradle? supports gradle version ranges?
Since gradle uses Ivy for dependency management, I guess you can benefit from all Ivy features, including version ranges, sub version matching (with the +) and even pluggable version matchers.

Xavier





marko



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email





--
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://ant.apache.org/ivy/
http://www.xoocode.org/
Reply | Threaded
Open this post in threaded view
|

Re: dependencies: version ranges

hans_d
Administrator
In reply to this post by Marko Bauhardt-3
Hi Marko, Hi Xavier,

On Jul 15, 2008, at 7:45 PM, Marko Bauhardt wrote:

> Hi all,
> maven and i think ivy (http://www.jaya.free.fr/ivy/doc/ivyfile/ 
> dependency.html) supports version ranges.
> i dont find something in the userguide from gradle.
>
> but i tried this in my build file
>
> compile ":commons-httpclient:3.0.+"
>
> and gradle gets the jar with the highest version from my local lib  
> folder.
>
> -----
>      found #commons-httpclient;3.0.7 in lib
>         [3.0.7] #commons-httpclient;3.+
> ----
>
> is this a hidden feature of gradle? supports gradle version ranges?

We delegate the version to Ivy. So as Xavier has said, what Ivy can  
do here, is offered by Gradle. The thing is that I still haven't  
digested all of Ivy's features. That is one reason why our layer on  
top does not offer everything which Ivy offers. In this case it is  
passed through and works in other cases we prevent people from using  
the full power of Ivy (e.g. global excludes). But usually you can use  
the Ivy API directly in such scenarios and hook the Ivy classes you  
have created into Gradle's dependency layer. Sometimes this is a bit  
of hack. We have three strategies to improve this.

- Adding features to Gradle's Ivy DSL
- Offer a clean interface to hook into for manipulating some of the  
Ivy classes we generate (e.g. the ModuleDescriptor).
- Offer support for using the ivy.xml and ivysettings.xml as an  
alternative notation to the dependency notation in the build.gradle  
file. Possibly we even provide a merge feature.

- Hans

--
Hans Dockter
Gradle Project lead
http://www.gradle.org





---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email