gradle 与 android gradle 插件的关系

名词解释:android

1,Gradle: Gradle是一种构建工具,它使用一种基于Groovy的特定领域语言(DSL)来构建项目。不单单用于android 工程的构建。app

2,Android Plugin for Gradle: 这就是为了编译android 工程而开发的插件。下面就是申明Android Gradle 插件的位置。(build.gradle)工具

buildscript {
  ...
  dependencies {
    classpath 'com.android.tools.build:gradle:2.2.0'
  }
}

 

1,gradle 各版本源码地址gradle

http://services.gradle.org/distributions/ui

2, google 官网 gradle 插件 与 gradle 版本对照地址this

https://developer.android.google.cn/studio/releases/gradle-plugin#updating-plugingoogle

 

3,gradle 版本与google gradle 插件版本的区别spa

在gradle wrapper.properties  中写的是 gradle 版本。插件

distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip

在build.gradle 中依赖的是 gradle插件版本。code

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
}
相关文章
相关标签/搜索