How can I generate module graphs for my multi-module Android project?

24 Views Asked by At

I have a multi-module Android project and I'd like to generate module dependency graphs for each of the modules. I can use the Module Graph Assert plugin to manually generate each graph using the command:

./gradlew generateModulesGraphvizText -Pmodules.graph.output.gv=my_module_dependency_graph.gv -Pmodules.graph.of.module=:my_module 

But this requires me to manually write each module name into the command.

I can obtain the list of module names using ./gradlew projects, then do some text formatting in bash to execute the above command for each module, however, I'm wondering if there is a more elegant way of achieving this? Ideally by having a single gradle task which can then be called in CI.

0

There are 0 best solutions below