I'm having few different variants and for each variant I'm having different module into my project but now I got a new requirement where I'll have to use an existing module in a new build variant. It means if any changes happen in code of variant1
the changes should be reflected in the apps of variant1
and variant3
. Hope my query is clear.
In above image,
companion
Please guide me if there is a good solution to use it. Currently I'm copying whole files of wallet into companion which is not feasible solution for future.
let's assume we have moduleA
and moduleB
, to access moduleB
inside of moduleA
add implementation project(":moduleB")
to moduleA
build.gradle
file.
Note that all files inside moduleB
will be available to moduleA
but files inside moduleA
aren't available to moduleB
be sure to declare your modules in settings.gradle
include ':moduleA'
include ':moduleB'