Add module graph plugin and expose the graph in the README

This commit is contained in:
Benoit Marty
2022-12-22 12:05:14 +01:00
parent 01470c9aa7
commit 90f9a7a69f
5 changed files with 37 additions and 5 deletions

View File

@@ -3,3 +3,25 @@
Proof Of Concept to run a Matrix client on Android devices using the Matrix Rust Sdk and Jetpack compose.
The plan is [here](https://github.com/vector-im/element-x-android-poc/issues/1)!
### Modules
This Android project is a multi modules project.
- `app` module is the Android application module. Other modules are libraries;
- `features` modules contain some UI and can be seen as screen of the application;
- `libraries` modules contain classes that can be useful for other modules to work.
A few details about some modules:
- `libraries-core` module contains utility classes;
- `libraries-designsystem` module contains Composables which can be used across the app (theme, etc.);
- `libraries-elementresources` module contains resource from Element Android (mainly strings);
- `libraries-matrix` module contains wrappers around the Matrix Rust SDK.
Here is the current module dependency graph:
<!-- To update this graph, run `./tools/docs/generateModuleGraph.sh` (one day the CI will do it hopefully). -->
<img src=./docs/images/module_graph.png width=800 />

View File

@@ -9,6 +9,7 @@ plugins {
alias(libs.plugins.kapt) apply false
alias(libs.plugins.detekt)
alias(libs.plugins.ktlint)
alias(libs.plugins.dependencygraph)
}
tasks.register<Delete>("clean").configure {

Binary file not shown.

After

Width:  |  Height:  |  Size: 270 KiB

View File

@@ -58,6 +58,7 @@ anvil = "2.4.2"
# quality
detekt = "1.22.0"
ktlint = "11.0.0"
dependencygraph = "0.10"
[libraries]
# Project
@@ -148,3 +149,4 @@ ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
anvil = { id = "com.squareup.anvil", version.ref = "anvil" }
detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }
ktlint = { id = "org.jlleitschuh.gradle.ktlint", version.ref = "ktlint" }
dependencygraph = { id = "com.savvasdalkitsis.module-dependency-graph", version.ref = "dependencygraph" }

View File

@@ -0,0 +1,7 @@
#!/usr/bin/env bash
## Dependency graph https://github.com/savvasdalkitsis/module-dependency-graph
dotPath=`pwd`/docs/images/module_graph.dot
pngPath=`pwd`/docs/images/module_graph.png
./gradlew graphModules -PdotFilePath=${dotPath} -PgraphOutputFilePath=${pngPath} -PautoOpenGraph=false
rm ${dotPath}