摇篮版本和摇篮构建工具版本之间的关系 [英] relation between gradle version and gradle build tool version

查看:264
本文介绍了摇篮版本和摇篮构建工具版本之间的关系的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新来的摇篮,并得到了2个问题:

  1. 摇篮本身就是一个构建工具,那么为什么需要对Android的摇篮工具 com.android.tools.build:gradle:0.7。+ 的脚本?

  2. 什么是安装在版本之间的关系摇篮(比如说1.9)和该Android的摇篮工具的版本,如0.7 +在类路径COM .android.tools.build:摇篮:0.7 +。如果我改变了后者的版本0.8,+则构建失败上找不到插件AppPlugin。

解决方案

我会尽量回答你的问题。

  1. 正如你所说,摇篮是一个构建工具,但你提到的第一个问题就行指的是摇篮的Java插件版本。摇篮有插件构建Java项目。这些插件扩展后的通用构建工具是摇篮,并可能提供额外的功能。你可以阅读更多关于摇篮插件这里

  2. 当您更改插件版本是简单的构建失败的原因,插件版本0.8是不存在的。还有就是摇篮版本和插件版本和开发商之间的关系已经维持了。您只能使用已发布插件版本,是 兼容的摇篮版本。我希望回答第一个问题回答了这个反正。

I'm new to gradle and got 2 questions:

  1. gradle itself is a build tool, so why is the need for Android gradle tool com.android.tools.build:gradle:0.7.+ in the script?

  2. What is the relation between the version of gradle installed (say 1.9) and the version of that Android gradle tool, like 0.7.+ in classpath 'com.android.tools.build:gradle:0.7.+'. If I changed the latter's version to 0.8.+ then the build fails on 'could not find plugin AppPlugin'.

解决方案

I will try to answer your questions.

  1. As you said, Gradle is a build tool, but the line you have mentioned in your first question is referring to Gradle Java plugin version. Gradle has plugin for building Java projects. These plugins extend upon the general purpose build tool Gradle is, and may provide additional features. You can read more about the Gradle plugins here.

  2. The reason your build fails when you change the plugin version is simple, the plugin version 0.8 is not there. There is a relationship between Gradle version and the plugin version and a developer has to maintain that. You can only use a plugin version which has been released and is compatible with the Gradle version. I hope the answer to first question answers this anyways.

这篇关于摇篮版本和摇篮构建工具版本之间的关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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