What is the difference between declaring repositories in the buildScript section of the gradle build or in the root level of the build.
buildScript
Option 1:
The build script (i.e. build.gradle) may have some dependencies for the execution of the build script itself. You would enclose those dependencies within the buildScript block. Chapter 4 of Gradle Beyond the Basics describes it in detail.