Android – How to find the version of library from Gradle Dependency? Android Studio



How do I find the version of libraries that are being used when my Gradle file mentions a dependency using the '+' operator in the version number of the dependency?


My build.gradle under app module reads like so:

dependencies {
  compile fileTree(dir: 'libs', include: ['*.jar'])
  compile ''

What is the version of the play-services library that is being used here?

Best Solution

You can use gradles' build-in 'dependencyInsight' task to query the resolved version of your dependency:

gradle dependencyInsight --configuration compile --dependency

If you want to get an overview for all your dependencies in one go, you can do

gradle dependencies

If you use the gradle wrapper you must use ./gradlew instead of gradle