Using the Gradle build system, is it possible to give a warning during building when a newer version of a dependency is available?
I got the following dependencies for example:
dependencies {
compile 'com.nativelibs4java:bridj:0.6.2'
compile 'net.java.dev.jna:jna:4.1.0'
compile 'de.vorb:jtesseract:0.0.4'
compile 'de.vorb:jleptonica:0.0.2'
testCompile 'junit:junit:4.11'
}
And I expect them to be updated quite often. Some are in a released version, hence it could be safe to pull updates automatically if Gradle supports that, but I rather do not. And the rest is just clearly in an alpha or beta phase and updates could break everything theoretically.
So as concrete example I'd want a warning if junit:junit:4.12
gets released for example.
Gradle doesn't ship with this functionality out-of-the-box, but you could look out for a third-party plugin (or write your own). Quick Google search turned up https://github.com/ben-manes/gradle-versions-plugin.
Edit 2018: versioneye is deprecated, but Android Studio 3.0 gives deprecation warnings out of the box in the editor - at least as long as your build.gradle
follows a simple format, without variables. Otherwise, you can generate a simple fake build.gradle file as I wrote below, and when you open this file, the IDE will do its work.
You can use a service like Versioneye although the support for Gradle is not full, particularly if your build script is split across multiple files, uses variables etc.
With Versioneye, you can either 1) have it scan your repo (connect via GitHub/Bitbucket etc.), or 2) upload build script manually, or 3) install gradle plugin (which will however upload data to their servers).
I wrote a tool to generate a "versioneye-friendly" file to be manually uploaded to the service. You can find it in this answer.