For manual exploration of the project graph, we recommend the use of Gephi. Gephi can directly load the GraphML files generated by the Graph Analytics Plugin and provide a rich set of tools for exploring and visualizing the project graph.
To use Gephi, you must first generate a GraphML file from the project graph.
The Graph Analysis Plugin provides a Gradle task (graphAnalysis), available on every
project module, to generate this file. Selecting a project module at the top of the
project (e.g., the application module that contains the other modules as dependencies)
is recommended.
For example, in the sample project we could run:
$ ./gradlew :app:graphAnalysisUpon successful completion, the resulting GraphML file will be located at:
app/build/graphAnalytics/analysis.graphml
This file may then be loaded into Gephi for visualization.
The following settings are recommended as a decent starting point for visualization of the project graph data:
- In the
Graphwindow, adjust visibility settings:- Enable
Show Node Labels(Outlined 'T' in the bottom left) - Adjust the label font size down
- Enable
- Configure the
Layout:- Use
Force Atlaslayout with the following parameter changes:Repulsion strength: 500.0Attraction distribution: checkedAdjust by sizes: checked
RuntheForce Atlaslayout until it stabilizes, then hitStop
- Use
- Use the
LabelAdjustlayout engine. HitRunand thenStopafter it stabilizes - Adjust appearance settings to highlight problematic dependencies:
Nodesappearance. Adjust and hitApplyon each:Colortab, usebetweennessCentralityranking and select a color paletteSizetab, usenetworkBelowranking- Min size: 1
- Max size: 500
Label Colortab, useoutDegreeand select a color paletteLabel Sizetab, leave at default
Edgesappearance:Colortab, useclasspartitioning and select a color paletteLabel Colortab, leave at defaultLabel Sizetab, leave at default