I have set up a multi-project with Gradle as below (of course simplified to present the situation)...
root +--> A (java library) +--> B (java) +-->