Welcome to Gradle Glam, a series on useful Gradle plugins and how to make the most out of them in your build. Hopefully I'll be able to post at least one entry per week
Let's begin with a tiny but quite resourceful plugin: gradle-versions-plugin. Seasoned Grails and Griffon developers know they can keep track of their plugin dependencies by invoking list-plugin-updates
command. While useful this command does not list updates for regular JAR dependencies, only framework plugins. Bummer. Grails and Griffon resolve their dependencies using a DSL inspired by Gradle. So what if there were a plugin for Gradle that would display dependency updates? Well, this is precisely what the gradle-versions-plugin does.
Inspired by the versions-maven-plugin this little plugin will calculate the delta in your current dependency graph, given the latest artifacts available on the repositories configured for your build.
Here's how you apply the plugin to your build
Say we apply this plugin to a basic Griffon 2.0.0.BETA2 project; running the gradle dependencyUpdates
command yields the following information
The gradle-versions-plugin finds out that all Griffon dependencies are out of date, as by the time of writing this entry, the latest Griffon release is 2.0.0.BETA3. Interestingly enough, the plugin can also figure out if a gradle plugin is out of date, as witnessed by the shadow
and macappbundle
plugins for example.
See what happens when the project switches all Griffon dependencies to their latest released version
Pretty nifty, wouldn't you say?
I'd like to close this inaugural entry of Gradle Glam with my feature wish-list for this plugin
- generate XML and HTML reports than can be hooked into the
build-dashboard
plugin.
Keep on Groovying!