Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Deprecate nested builds without a settings.gradle #3137
As stated in gradle/gradle-private#708, we're going to deprecate and remove support for upward-searching
With this change, this part of https://docs.gradle.org/4.2.1/userguide/build_lifecycle.html#sec:initialization would be changed to:
However, given that this is a considerable behavior change, I'd like to break this thing into two steps:
The deprecation thing includes:
No, we are removing support for not searching upwards.
This is not the intended behavior.
The linked ticket is about the following scenario: You have a build with a settings.gradle file. Nested in a directory under that build is another build without a settings.gradle file. When you try to run that nested build, Gradle will search upwards to find the settings.gradle file, load that file and determine that the project you were trying to start is actually not part of that higher-level build. It will then roll back a bunch of services and start again, treating it as a single-project build instead.
This is complex and should be deprecated/removed.
In the future, Gradle would throw an error when it finds a settings.gradle file further up, but that settings.gradle file doesn't actually include the project you were trying to run. To fix that, the user should add a settings.gradle file to the nested build.