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.
Go to Android Studio -> Preferences -> Plugins (for Mac) and File -> Settings -> Plugins (for windows) and search “Check for Dependency updates plugin”. Install it and restart android studio. You will be able to see Dependencies tab on the right which will show if any dependency has a new update available.
The Gradle build system in Android Studio makes it easy to include external binaries or other library modules to your build as dependencies. The dependencies can be located on your machine or in a remote repository, and any transitive dependencies they declare are automatically included as well.
In Android Studio, dependencies allows us to include external library or local jar files or other library modules in our Android project.
To use your new Android library's code in another app or library module within the same project, add a project-level dependency: Navigate to File > Project Structure > Dependencies. Select the Module in which you'll use the library. In the Declared Dependencies tab, click and select Module Dependency in the dropdown.
In Android Studio this check is path of Lint checks. You can see it here:
https://android.googlesource.com/platform/tools/base/+/master/lint/libs/lint-checks/src/main/java/com/android/tools/lint/checks/GradleDetector.java
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));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With