I can't figure out why the order of ext {} matters and causes a failure such as below? Without an example to copy, how are you guys figuring the order to put things? The docs seem to just talk about the closures in isolation and not interdependencies between them ?
project-base
settings.gradle
build.gradle (inside this one in examples below)
subproject_folder
build.gradle
ext {} // this blows up here
buildscript {}
plugins {}
sonarqube {}
allprojects {}
subprojects {}
but if I have the same thing except
buildscript {}
plugins {}
sonarqube {}
allprojects {}
subprojects {}
ext {} // bingo all of a sudden this is legal ?
The issue is not the position of the ext {} block, it is the position of buildscript {} and plugins {} blocks.
As indicated in the documentation, the plugins {} block must be the first in a build file.
And because the buildscript {} block is also about determining what is accessible in a build file, its classpath effectively, it has similar limitations.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With