Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I check which Gradle Android plugin version is used in my project?

In my build.gradle file I set the following dependency:

dependencies {     classpath 'com.android.tools.build:gradle:0.5.+' }  

This will automatically adapt to the latest released version (like it's described here).

How can I check which current release is used in my project?

EDIT 2013-08-08:

buildscript {     repositories {         mavenCentral()     }     dependencies {         classpath 'com.android.tools.build:gradle:0.5.+'     } } 
like image 713
owe Avatar asked Aug 07 '13 08:08

owe


People also ask

What is my android Gradle plugin version?

Here are at least two ways you can find out the gradle version (not the gradle plugin version) by selecting one of the following on project tab on left: Android > Gradle Scripts > gradle-wrapper. properties (Gradle Version) > distributionURL.

Where is Android Gradle plugin located?

You can specify the Gradle version in either the File > Project Structure > Project menu in Android Studio, or update your Gradle version using the command line. The preferred way is to use the Gradle Wrapper command line tool, which updates the gradlew scripts.

When Gradle plugins are applied to a project?

Applying a plugin to a project allows the plugin to extend the project's capabilities. It can do things such as: Extend the Gradle model (e.g. add new DSL elements that can be configured) Configure the project according to conventions (e.g. add new tasks or configure sensible defaults)


1 Answers

Showing the resolved dependencies for the build script class path isn't a built-in operation as for other configurations (which can be inspected with gradle dependencies). However, you can write a task to do so. For example:

task showClasspath  {     doLast {         buildscript.configurations.classpath.each { println it.name }     } } 

A variation that just shows the Android plugin version:

task showVersion {     doLast {         println buildscript.configurations.classpath.resolvedConfiguration.firstLevelModuleDependencies.moduleVersion     } } 
like image 155
Peter Niederwieser Avatar answered Oct 11 '22 20:10

Peter Niederwieser