/Android-multimodule-dependency-graph

Creates a dependency graph for an Android multimodule project.

Primary LanguagePython

Intro

Generates dependency graph for project modules in Android multimodule project. Works only if modules have their project dependencies declared in their build.gradle file. In case of a circular dependency, modules that cause circular dependency will be marked on a dependency graph with different color.

How it works

Project modules are retrieved from settings.gradle, and each module build.gradle is checked for a dependencies.

Example where module app has a dependency on module core:navigation:

> settings.gradle

include ':app'
include ':core:navigation'
> app > build.gradle

dependencies {
    implementation project(':core:navigation')
}

Generated dependency graph:


Circular dependency graph:

Instructions

  • Install python dependencies from requirements.txt file.
  • Run python main.py
  • Enter Android project path.

You can also pass in the project path as an argument: python main.py {project_path}


Tested on Chris Banes Tivi and Google's Now in Android projects.