Check out the link for the project structure image.
RootModule
--- ChildModule1
--- ChildModule2
--- ChildModule3
ChildModule3 depends on ChildModule2 depends on ChildModule1
Each settings.gradle defines
include ':PreviousModule'
project(':PreviousModule').projectDir = new File(settingsDir, '../PreviousModule')
And build.gradle contains
implementation project(':PreviousModule')
I even tried
compile project(':PreviousModule')
but no help.
If you want to continue setting it up as a multi-module project, you would want only one settings.gradle and that would be inside the root project. Please remove others as they are unnecessary
RootModule -> settings.gradle
include "ChildModule1"
include "ChildeModule2"
//...
then in ChildModule2 -> build.gradle
dependencies {
compile project('ChildModule1')
}