From Gradle User Guide we can read that
You can use the -b option to select another build file. If you use -b option then settings.gradle file is not used.
So lets have:
-Example #Project root --src --main --test --build.gradle --second.gradle #Second build script --settings.gradle
What is the purpose of this? If I want to try something different with my multiproject build I create another script file - second.gradle and put it in the same directory. But want old settings.gradle file to include my subprojects.
If I execute my gradle comands when I am in the root directory of Example project for ex:
gradle -b second.gradle clean build
Why Gradle does not use settings.gradle file? To protect itself when specified build file is not in the same dir, because Gradle will looks for settings.gradle in the direcotry of build.gradle file and after that in the parent directory. But they can empty or can be from another project?