How do you know which latest version of any dependency we include in Gradle is there?

In gradle, I do not use dynamic versions, because this can lead to undefined builds. Therefore, I indicate my dependencies like this:

compile 'com.squareup.okhttp:okhttp:2.2.0'

However, how do you know if there is a new version and what is its number?

+4
source share
2 answers

You can use gradle-versions-plugin to do this. This plugin provides a task dependencyUpdatesthat

Displays a report on the current project dependencies, exceeds the latest version found, has updates, or cannot be resolved.

, , , build.script, :

buildscript {
  repositories {
    jcenter()
  }

  dependencies {
    classpath 'com.github.ben-manes:gradle-versions-plugin:0.11.3'
    // classpath 'org.codehaus.groovy:groovy-backports-compat23:2.3.5' // uncomment if you're using Gradle 1.x
  }
}

, :

apply plugin: 'com.github.ben-manes.versions'
+3

.

+2

Source: https://habr.com/ru/post/1615043/


All Articles