Hi,
I’m not sure how to configure the settings.gradle for a build structure something like this:
.
├── build.gradle
├── group1
│ ├── project3
│ │ └── build.gradle
│ └── project4
│ └── build.gradle
├── project1
│ └── build.gradle
├── project2
│ └── build.gradle
└── settings.gradle
- The group1 directory is an empty directory.
- The projects under group1 all depend on project1 and project2.
Based on some googling my understanding is that there should be a single settings.gradle. I tried something like this:
include “:project1”
include “:project2”
include “:group1:project3”
include “:group1:project4”
And in the build.gradle for project3 and project4:
apply from: “$rootProject.projectDir/src-utils/jar.gradle”
…
dependencies {
compile project(‘:project1’)
compile project(‘:project2’)
}
Is it ok to have an empty directory in a gradle build?
How to you reference the subproject it contains in the top level settings.gradle?
Would the $rootProject.projectDir correctly reference the top level directory (not the empty directory) when used in the subproject build.gradle?
I have found similar questions but most are related to applying configuration to sub projects and I have been unable to figure out the correct configuration.
Any help would be much appreciated.
Cheers,
Stuart