Standard API for dependency version comparison

The gradle-versions-plugin generates a report of which dependencies have newer versions available. It does so by using Gradle’s dependency resolution and compares versions using a Gradle internal API (derived from ivy). This breaks every couple of Gradle releases, and has again with Gradle 2.3-rc-1.

It would be nice if Gradle provided a comparator in the external API, perhaps as part of the artifact query API. Then this plugin could use that instead of the more fragile approach of peeking at Gradle internals. An alternative that I’ve been hesitant to use is to copy the ivy comparator logic into the plugin. I’d prefer delegating as much of the dependency management to Gradle due to its much deeper expertise and track record for evolving into new domains.

Another approach is for Gradle to include a dependency versions report in its base distribution, thereby deprecating this plugin. This is a useful feature that I feel falls into the domain of Gradle’s current dependency management tasks. It was also very simple to implement as a detached configuration and delegating all the complexity to Gradle’s facilities.

Thanks, Ben

1 Like