repositories declaration inside build.gradle
I've been confused about the different repositories declaration inside build.gradle
.
There are:
repositories
inside top-levelbuild.gradle
'sbuildscript
blockrepositories
inside top-levelbuild.gradle
'sallprojects
blockrepositories
inside each modulebuild.gradle
'sbuildscript
blockrepositories
at each modulebuild.gradle
Breaking down to 2 differences, repositories
inside buildscript
block and others.
inside buildscript
block
The buildscript
configuration section is for gradle itself (i.e. changes to how gradle is able to perform the build).
So the repositories
here only affecting gradle building process.
inside top-level allprojects
or module
The allprojects
section is for the modules being built by Gradle, hence repositories
inside the module is module specified.
This type of repositories
is where your dependencies
used to look up packages.