Multi-module project with flavors: module does not include other modules it depends on


We have a multi-module project in which some modules depend on other modules. These modules also have flavors.

We followed the example in in order to get JitPack to properly publish the project’s artifacts, and things are mostly working fine.

However, we found the following issue. Let’s say :moduleA depends on :moduleB (via api project(:moduleB) ), and both modules have flavors. The POM for :moduleA does not include :moduleB , which means consumers will have to know to add :moduleB as a dependency in their project. This makes consuming our library cumbersome.

This issue does not occur if we do not have flavors in both modules (and thus we can revert the change we learned from multi-flavor-lib-demo ).

Is there a way to get :moduleA 's POM to include :moduleB 's artifacts?

Thanks in advance.