摇篮buildscript依赖 [英] Gradle buildscript dependencies
问题描述
是什么在构建的gradle的 buildScript
部分或构建的根级别声明库之间的差异。
选项1:
的build.gradle
buildScript {
库{
mavenCentral();
}
}
或
的build.gradle
{库
mavenCentral();
}
在buildScript块的存储库是用于取您的buildScript依赖的相关性。这些都是把你的编译的类路径,并可以从您的构建文件指的依赖关系。例如额外的插件存在在互联网上。
在根目录下的仓库被用来获取您的项目依赖的依赖关系。因此,你需要所有的依赖编译你的项目。
What is the difference between declaring repositories in the buildScript
section of the gradle build or in the root level of the build.
Option 1:
build.gradle:
buildScript {
repositories {
mavenCentral();
}
}
or
build.gradle:
repositories {
mavenCentral();
}
The repositories in the buildScript block are used to fetch the dependencies of your buildScript dependencies. These are the dependencies that are put on the classpath of your build and that you can refer to from your build file. For instance extra plugins that exist on the internet.
The repositories on the root level are used to fetch the dependencies that your project depends on. So all the dependencies you need to compile your project.
这篇关于摇篮buildscript依赖的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!