Thesettings.gradlefile, located in the root project directory, tells Gradle which modules it should include when building your app.
If different source sets contain different versions of the same file, Gradle uses the following priority order when deciding which file to use (source sets on the left override the files and settings of source sets to the right):
build variant > build type > product flavor > main source set > library dependencies