From adfac940948bfaab4e0b2abc98474951994bf2a8 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Sun, 2 Apr 2023 23:38:03 +0530 Subject: [PATCH] feat: add a module graph to the README --- README.md | 26 ++++++++++++++++++++++++++ android/build.gradle.kts | 2 +- build.gradle.kts | 10 +++++++--- gradle/libs.versions.toml | 1 + settings.gradle.kts | 2 ++ 5 files changed, 37 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1ef271c5..470ee5f9 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,32 @@ Unofficial Android app for read-only access to [lobste.rs](https://lobste.rs), b Snapshots from the development branch can be obtained [here](https://github.com/msfjarvis/compose-lobsters/releases/tag/nightly). +## Dependency Diagram +```mermaid +%%{ + init: { + 'theme': 'neutral' + } +}%% + +graph LR + + benchmark --> android + android --> api + android --> common + android --> core + android --> coroutine-utils + android --> database + android --> metadata-extractor + android --> model + api --> model + common --> core + common --> database + common --> model + metadata-extractor --> model + database --> core + +``` ## License See [LICENSE](LICENSE) diff --git a/android/build.gradle.kts b/android/build.gradle.kts index b36a1f70..7ee31759 100644 --- a/android/build.gradle.kts +++ b/android/build.gradle.kts @@ -4,7 +4,7 @@ * license that can be found in the LICENSE file or at * https://opensource.org/licenses/MIT. */ -@file:Suppress("DSL_SCOPE_VIOLATION", "UnstableApiUsage") +@file:Suppress("UnstableApiUsage") plugins { id("dev.msfjarvis.claw.android-application") diff --git a/build.gradle.kts b/build.gradle.kts index b004a595..0104f3a9 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,14 +1,18 @@ /* - * Copyright © 2021-2022 Harsh Shandilya. + * Copyright © 2021-2023 Harsh Shandilya. * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at * https://opensource.org/licenses/MIT. */ -@file:Suppress("DSL_SCOPE_VIOLATION") - plugins { id("dev.msfjarvis.claw.spotless") id("dev.msfjarvis.claw.versions") id("dev.msfjarvis.claw.kotlin-common") alias(libs.plugins.android.test) apply false + alias(libs.plugins.modulegraph) +} + +moduleGraphConfig { + readmePath.set(project.layout.projectDirectory.file("README.md").asFile.absolutePath) + heading.set("## Dependency Diagram") } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index db90f797..ec21e28e 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -93,5 +93,6 @@ whetstone = { module = "com.deliveryhero.whetstone:whetstone", version.ref = "wh android-test = { id = "com.android.test", version.ref = "agp" } anvil = "com.squareup.anvil:2.4.4" kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } +modulegraph = "dev.iurysouza.modulegraph:0.2.2" sqldelight = { id = "app.cash.sqldelight", version.ref = "sqldelight" } whetstone = { id = "dev.msfjarvis.whetstone", version.ref = "whetstone" } diff --git a/settings.gradle.kts b/settings.gradle.kts index fed049bf..707da83d 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -32,6 +32,8 @@ pluginManagement { includeModule("com.github.ben-manes", "gradle-versions-plugin") includeModule("org.gradle.android.cache-fix", "org.gradle.android.cache-fix.gradle.plugin") includeModule("gradle.plugin.org.gradle.android", "android-cache-fix-gradle-plugin") + includeModule("dev.iurysouza.modulegraph", "dev.iurysouza.modulegraph.gradle.plugin") + includeModule("dev.iurysouza", "modulegraph") } } exclusiveContent {