Include dependent modules of Depending module


(Dimutu) #1

Hi All,
Following is my project structure :

Module A’s Structure

  1. com.a.module_A:4.3.0-SNAPSHOT` (Main Module)
    ----1.1. com.b.module_B:2.18.0-SNAPSHOT (Sub Module)

Module B’s Structure
2. com.b.module_B:2.18.0-SNAPSHOT
----2.1 com.c.module_C:4.15.0-SNAPSHOT
-----2.2 com.d.module_D:6.3.0-SNAPSHOT

The module A is an extinction of B. I want the module A to fetch both module B and as well as its subset of dependency (Module C and D) and bundle it to module A. I’ve been trying couple of things and cannot seems to work on it.

at the moment Module A’s build.gradle looks like this :
dependencies {
compile com.b.module_B:2.18.0-SNAPSHOT
compile com.c.module_C:4.15.0-SNAPSHOT
Ideally Module A should use the identical versions of what Module B is using for both Module C and D. Is there a way I can get the versions automatically from the Module B without having to change them manually each time a version on depending module changes ?

Can you guys help me with this please.
Thank you.