Gradle multi-project, change default build filename (build.gradle)
ok, done...
In settings.gradle:
String myFileName="build2.gradle"
rootProject.buildFileName = "${myFileName}"
rootProject.children.each {project ->
project.buildFileName = "${myFileName}"
assert project.projectDir.isDirectory()
assert project.buildFile.isFile()
}
Or for nested multiproject in settings.gradle
:
setBuildFileName(rootProject)
def setBuildFileName(project) {
project.children.each { childProject ->
childProject.buildFileName = "${childProject.name}.gradle"
assert childProject.projectDir.isDirectory()
assert childProject.buildFile.isFile()
setBuildFileName(childProject)
}
}