Gradle buildscript dependencies

后端 未结 3 1380
我寻月下人不归
我寻月下人不归 2020-11-28 02:18

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:

<
3条回答
  •  被撕碎了的回忆
    2020-11-28 02:23

    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.

提交回复
热议问题