Subprojects not building with custom build file name.
$ mv build.gradle _build.gradle
$ gradle -b _build.gradle build // not work
$ mv _build.gradle build.gradle
$ gradle build // work
Subprojects not building with custom build file name.
$ mv build.gradle _build.gradle
$ gradle -b _build.gradle build // not work
$ mv _build.gradle build.gradle
$ gradle build // work
-b
behaves a bit like if you specified -u
and -p project-dir
. You’re passing the path to the project’s build file, which is also the project directory. So the command line gradle -b _build.gradle
means there’s a root project path in the current directory.
If you want to have different subproject build file names, you can do something like Gradle does: https://github.com/gradle/gradle/blob/master/settings.gradle#L81