Settings.include() (or a better mechanism for including my working subproject ?)

Settings.include() syntax/usage?

I am trying to create a build hierarchy that is not a single massive build.gradle :slight_smile: We have a series of stand alone sample applications contained in a subdirectory (ie . /samples), and I would like to specify the app list only in that subdirectory. I have working a single directory level, specifying the list of sub projects in a settings.gradle include list. What I want to do now is to reference all of that from a parent directory (my top level).

In effect at my top, I want to include ā€œeverything defined in the sample apps dirā€. I have worked my way through the samples without stumbling over something that works to build my ā€œgrandchildā€ apps from the top level.

I thought that I should be able to use:

Settings.include([ā€˜samplesā€™]) but that gives me an error indicating I am missing the obvious constructor understanding.

Any suggestions on this issue ?

You canā€™t currently have multiple ā€˜settings.gradleā€™ files in a single Gradle build. All subprojects have to be listed in the top-level ā€˜settings.gradleā€™. You could think about scripting something yourself so that 'settings.gradle. gets its information from other files, but there is no built-in solution.

Thanks for the follow up and confirmation Peter.