this build-script source will raise this error: > Could not find property ‘reposClosure’ on repository container. (All properties for the reposClosure are dfined in gradle.properties.)
You run into a scoping issue with your custom closure. You might want to set the delegate of the closure manually to project or you just change your code snippet
The ‘buildscript’ block contains information necessary to evaluate (even compile) the (rest of the) build script. Therefore it gets evaluated before, and separate from, the rest of the build script. It can’t see the rest of the build script, but the rest of the build script can see it. Hence you’ll have to turn things around. Alternatively, something like ‘repositories.add(buildscript.repositories[0])’ should also work.