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

(david.hill) #1

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 ?

(Peter Niederwieser) #2

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.

(david.hill) #3

Thanks for the follow up and confirmation Peter.