Gradle 构建脚本中类路径的用途是什么

What's the use of classpath in Gradle buildscript

buildscript build.gradle(项目)的 dependencies 部分中包含 classpath 有什么用。示例:

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.5.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

classpath 'com.android.tools.build:gradle:1.5.0'它的目的是什么/它有什么作用?

这是Gradle本身使用的类路径。如果您想使用 non-standard 插件或其他支持 类 扩展您的构建逻辑,则必须在此类路径中找到它们。

提到的依赖项 com.android.tools.build:gradle:1.5.0 包含执行 android 特定构建内容的插件。