On 29/10/2012, at 3:54 AM, Joern Huxhorn wrote:
> I'm considering to write a plugin that checks for updates of all dependencies
> used in a (multi-)project.
>
> This is something that I currently do manually every once in a while and it
> is a rather cumbersome job that I'd therefore really like to see automated.
>
> The plan is to check for the maven-metadata, e.g.
> http://repo1.maven.org/maven2/commons-io/commons-io/maven-metadata.xml for
> commons-io:commons-io, evaluating at least <lastUpdated> and ideally also
> <release> and <latest> but this would obviously only work for maven
> repositories.
>
> But ideally, this would be part of the already present Gradle dependency
> handling so it could also work with any other supported repository type.
>
> Is there any way to already retrieve such information from the Gradle API?
If you just want to find the latest version of a given module, you can use a
regular dependency with version set to 'latest.integration' and then query the
result, something like this:
def result =
configurations.detachedConfiguration(dependencies.create('some.group:some-module:latest.integration'))
def latestVersion = result.allModuleVersions.findResult { it.id.name ==
'some-module' : it.id.version : null }
> If not, are there any plans to add something along that line in the near
> future?
Yes, we want to add a couple of things:
* list all the versions of a given module, optionally that meet some criteria,
such as status or matching a version range.
* fetch the meta-data for a given module version.
Would you be interested in helping to add the pieces of the API that your
plugin needs?
--
Adam Murdoch
Gradle Co-founder
http://www.gradle.org
VP of Engineering, Gradleware Inc. - Gradle Training, Support, Consulting
http://www.gradleware.com