我怎么能检查哪些摇篮Android插件版本是在我的项目中使用? [英] How can I check which Gradle Android plugin version is used in my project?

查看:226
本文介绍了我怎么能检查哪些摇篮Android插件版本是在我的项目中使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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

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

在我的项目是

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

修改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
}

这篇关于我怎么能检查哪些摇篮Android插件版本是在我的项目中使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆