我怎么能检查哪些摇篮Android插件版本是在我的项目中使用?我的、是在、摇篮、插件

2023-09-08 09:29:39 作者:沿海奔跑的少年。

在我的build.gradle文件I设置以下依赖性:

  {相关性    类路径'com.android.tools.build:gradle:0.5.+} 

这会自动适应最新发布的版本(像它这里描述 )。

在我的项目是

我怎么能检查至极当前版本中使用吗?

android studio动态控件,分享8个优秀的Android Studio插件

修改2013年8月8日:

  buildscript {    库{        mavenCentral()    }    依赖{        类路径'com.android.tools.build:gradle:0.5.+    }} 

解决方案

显示的解决依赖关系的构建脚本类路径不是一个内置的操作为其它配置(可与被检查依赖的gradle )。但是,你可以写一个任务来这样做。例如:

 任务showClasspath<< {    buildscript.configurations.classpath.each {调用println it.name}} 

一个变体,只是显示了Android插件版本:

 任务的showversion<< {    的println buildscript.configurations.classpath.resolvedConfiguration.firstLevelModuleDependencies.moduleVersion} 

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 wich current release is used in my project?

EDIT 2013-08-08:

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.5.+'
    }
}

解决方案

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 << {
    buildscript.configurations.classpath.each { println it.name }
}

A variation that just shows the Android plugin version:

task showVersion << {
    println buildscript.configurations.classpath.resolvedConfiguration.firstLevelModuleDependencies.moduleVersion
}