名词解释:
1,Gradle: Gradle是一种构建工具,它使用一种基于Groovy的特定领域语言(DSL)来构建项目。不仅仅用于android 工程的构建。
2,Android Plugin for Gradle: 这就是为了编译android 工程而开发的插件。下面就是申明Android Gradle 插件的位置。(build.gradle)
buildscript {
...
dependencies {
classpath 'com.android.tools.build:gradle:2.2.0'
}
}
1,gradle 各版本源码地址
http://services.gradle.org/distributions/
2, google 官网 gradle 插件 与 gradle 版本对照地址
https://developer.android.google.cn/studio/releases/gradle-plugin#updating-plugin
3,gradle 版本与google gradle 插件版本的区别
在gradle wrapper.properties 中写的是 gradle 版本。
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
在build.gradle 中依赖的是 gradle插件版本。
dependencies { //[this is the android gradle plugin version] classpath 'com.android.tools.build:gradle:3.1.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files }