brookmg / Android-multimodule-dependency-graph

Creates a dependency graph for an Android multimodule project.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

Creates a dependency graph for an Android multimodule project.


Languages

Language:Python 100.0%