Add module graph plugin and expose the graph in the README
This commit is contained in:
22
README.md
22
README.md
@@ -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 />
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
BIN
docs/images/module_graph.png
Normal file
BIN
docs/images/module_graph.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 270 KiB |
@@ -58,6 +58,7 @@ anvil = "2.4.2"
|
||||
# quality
|
||||
detekt = "1.22.0"
|
||||
ktlint = "11.0.0"
|
||||
dependencygraph = "0.10"
|
||||
|
||||
[libraries]
|
||||
# Project
|
||||
@@ -78,8 +79,8 @@ androidx_lifecycle_process = { module = "androidx.lifecycle:lifecycle-process",
|
||||
|
||||
androidx_lifecycle_viewmodel_compose = { module = "androidx.lifecycle:lifecycle-viewmodel-compose", version.ref = "lifecycle" }
|
||||
androidx_activity_compose = { module = "androidx.activity:activity-compose", version.ref = "activity_compose" }
|
||||
androidx_fragment = {module = "androidx.fragment:fragment-ktx", version.ref = "fragment"}
|
||||
androidx_startup = { module = "androidx.startup:startup-runtime", version.ref = "startup"}
|
||||
androidx_fragment = { module = "androidx.fragment:fragment-ktx", version.ref = "fragment" }
|
||||
androidx_startup = { module = "androidx.startup:startup-runtime", version.ref = "startup" }
|
||||
|
||||
androidx_compose_bom = { group = "androidx.compose", name = "compose-bom", version.ref = "compose_bom" }
|
||||
androidx_compose_foundation = { group = "androidx.compose.foundation", name = "foundation" }
|
||||
@@ -127,7 +128,7 @@ jsoup = { module = "org.jsoup:jsoup", version.ref = "jsoup" }
|
||||
|
||||
|
||||
# Di
|
||||
inject = {module = "javax.inject:javax.inject", version = "1"}
|
||||
inject = { module = "javax.inject:javax.inject", version = "1" }
|
||||
dagger = { module = "com.google.dagger:dagger", version.ref = "dagger" }
|
||||
dagger_compiler = { module = "com.google.dagger:dagger-compiler", version.ref = "dagger" }
|
||||
anvil_compiler_api = { module = "com.squareup.anvil:compiler-api", version.ref = "anvil" }
|
||||
@@ -143,8 +144,9 @@ android_application = { id = "com.android.application", version.ref = "android_g
|
||||
android_library = { id = "com.android.library", version.ref = "android_gradle_plugin" }
|
||||
kotlin_android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
|
||||
kotlin_jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
|
||||
kapt = {id = "org.jetbrains.kotlin.kapt", version.ref = "kotlin"}
|
||||
kapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kotlin" }
|
||||
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
|
||||
anvil = {id = "com.squareup.anvil", version.ref = "anvil"}
|
||||
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" }
|
||||
|
||||
7
tools/docs/generateModuleGraph.sh
Executable file
7
tools/docs/generateModuleGraph.sh
Executable 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}
|
||||
Reference in New Issue
Block a user