Reputation: 27707
Android Studio seems to know when there's a newer version of a dependency. Maven repositories have all the versions so of course it can check there but it doesn't do it for all dependencies.
Noticed that it works for com.google and com.android dependencies but not for others. Why is that? Can it be configured? Any insight on this is appreciated.
Upvotes: 10
Views: 410
Reputation: 2309
In Android Studio this check is path of Lint checks. You can see it here:
And deps are hardcoded in this file:
} else if ("com.google.guava".equals(dependency.getGroupId()) &&
"guava".equals(dependency.getArtifactId())) {
version = getNewerRevision(dependency, new PreciseRevision(18, 0));
Upvotes: 2
Reputation: 2309
If you wish to check all deps, you can use this plugin https://github.com/ben-manes/gradle-versions-plugin
Add to your build.gradle call:
apply plugin: 'com.github.ben-manes.versions'
And then execute task:
./gradlew dependencyUpdates
Upvotes: 0
Reputation: 1311
Gradle does it for you. Notice that the suggested versions depend on the gradle version. If you are using an outdated gradle version you won't get these suggestions.
Upvotes: 0