Using special buildscript files in a Gradle multi-project build

Hey guys,

I’m trying to configure a Gradle multi-project build, but with some of the sub-projects having a buildscript file which has a different name, i.e. not build.gradle, but for example project1build.gradle. A bit similar to Gradle’s -b command-line option, only for a sub-project in a multi-project build. This is because a regular build.gradle exists as well and is used by Android Studio which I need to leave untouched, but in parallel some of the code needs to be part of a different multi-project build.

Is there a way to tell the root buildscript to look for sub-projects with different buildscript file names?

Thanks!

Ariel

Yes, this is done in settings.gradle.

include ':foo'

project(':foo').buildFileName = 'foo.gradle'

Thanks a lot! I’ll try it.
Ariel