Multi-project Builds

project_MAIN/
–settings.gradle (include project_global_configs)
–build.gradle (println var)
–project_A/
----build.gradle (println var)
----settings.gradle (include …/project_global_configs)
–project_B/
----build.gradle (println var)
----settings.gradle (include …/project_global_configs)
–project_global_configs/
----build.gradle (def var )

How to make it work?

Why do you have “settings.gradle” in your subprojects? The purpose of “settings.gradle” is to declare all sub-projects within a multi-project build, and it is located at the root dir of the whole project directories (project_MAIN).

And what “settings.gradle” is including, that’s sub-project definitions like this:

rootProject.name = 'projectMAIN’
include 'project_A, ‘project_B’