From c7dec20993052b8d2cab11fd3516dcdec43d68ae Mon Sep 17 00:00:00 2001 From: Simon Marquis Date: Sun, 31 Aug 2025 14:05:47 +0200 Subject: [PATCH 1/6] Generate Mermaid graphs --- .../AndroidApplicationConventionPlugin.kt | 2 + .../kotlin/AndroidLibraryConventionPlugin.kt | 2 + .../kotlin/AndroidTestConventionPlugin.kt | 2 + .../main/kotlin/JvmLibraryConventionPlugin.kt | 2 + .../google/samples/apps/nowinandroid/Graph.kt | 279 ++++++++++++++++++ 5 files changed, 287 insertions(+) create mode 100644 build-logic/convention/src/main/kotlin/com/google/samples/apps/nowinandroid/Graph.kt diff --git a/build-logic/convention/src/main/kotlin/AndroidApplicationConventionPlugin.kt b/build-logic/convention/src/main/kotlin/AndroidApplicationConventionPlugin.kt index 1ab3a2ca0..9cddabaf6 100644 --- a/build-logic/convention/src/main/kotlin/AndroidApplicationConventionPlugin.kt +++ b/build-logic/convention/src/main/kotlin/AndroidApplicationConventionPlugin.kt @@ -19,6 +19,7 @@ import com.android.build.api.variant.ApplicationAndroidComponentsExtension import com.android.build.gradle.BaseExtension import com.google.samples.apps.nowinandroid.configureBadgingTasks import com.google.samples.apps.nowinandroid.configureGradleManagedDevices +import com.google.samples.apps.nowinandroid.configureGraphTasks import com.google.samples.apps.nowinandroid.configureKotlinAndroid import com.google.samples.apps.nowinandroid.configurePrintApksTask import org.gradle.api.Plugin @@ -46,6 +47,7 @@ class AndroidApplicationConventionPlugin : Plugin { configurePrintApksTask(this) configureBadgingTasks(extensions.getByType(), this) } + configureGraphTasks() } } } diff --git a/build-logic/convention/src/main/kotlin/AndroidLibraryConventionPlugin.kt b/build-logic/convention/src/main/kotlin/AndroidLibraryConventionPlugin.kt index 3fe727410..7524678bc 100644 --- a/build-logic/convention/src/main/kotlin/AndroidLibraryConventionPlugin.kt +++ b/build-logic/convention/src/main/kotlin/AndroidLibraryConventionPlugin.kt @@ -18,6 +18,7 @@ import com.android.build.api.variant.LibraryAndroidComponentsExtension import com.android.build.gradle.LibraryExtension import com.google.samples.apps.nowinandroid.configureFlavors import com.google.samples.apps.nowinandroid.configureGradleManagedDevices +import com.google.samples.apps.nowinandroid.configureGraphTasks import com.google.samples.apps.nowinandroid.configureKotlinAndroid import com.google.samples.apps.nowinandroid.configurePrintApksTask import com.google.samples.apps.nowinandroid.disableUnnecessaryAndroidTests @@ -58,6 +59,7 @@ class AndroidLibraryConventionPlugin : Plugin { "implementation"(libs.findLibrary("androidx.tracing.ktx").get()) } + configureGraphTasks() } } } diff --git a/build-logic/convention/src/main/kotlin/AndroidTestConventionPlugin.kt b/build-logic/convention/src/main/kotlin/AndroidTestConventionPlugin.kt index 67933f77d..933327b2d 100644 --- a/build-logic/convention/src/main/kotlin/AndroidTestConventionPlugin.kt +++ b/build-logic/convention/src/main/kotlin/AndroidTestConventionPlugin.kt @@ -16,6 +16,7 @@ import com.android.build.gradle.TestExtension import com.google.samples.apps.nowinandroid.configureGradleManagedDevices +import com.google.samples.apps.nowinandroid.configureGraphTasks import com.google.samples.apps.nowinandroid.configureKotlinAndroid import org.gradle.api.Plugin import org.gradle.api.Project @@ -33,6 +34,7 @@ class AndroidTestConventionPlugin : Plugin { defaultConfig.targetSdk = 35 configureGradleManagedDevices(this) } + configureGraphTasks() } } } diff --git a/build-logic/convention/src/main/kotlin/JvmLibraryConventionPlugin.kt b/build-logic/convention/src/main/kotlin/JvmLibraryConventionPlugin.kt index a1477891d..2866de1a2 100644 --- a/build-logic/convention/src/main/kotlin/JvmLibraryConventionPlugin.kt +++ b/build-logic/convention/src/main/kotlin/JvmLibraryConventionPlugin.kt @@ -14,6 +14,7 @@ * limitations under the License. */ +import com.google.samples.apps.nowinandroid.configureGraphTasks import com.google.samples.apps.nowinandroid.configureKotlinJvm import com.google.samples.apps.nowinandroid.libs import org.gradle.api.Plugin @@ -31,6 +32,7 @@ class JvmLibraryConventionPlugin : Plugin { dependencies { "testImplementation"(libs.findLibrary("kotlin.test").get()) } + configureGraphTasks() } } } diff --git a/build-logic/convention/src/main/kotlin/com/google/samples/apps/nowinandroid/Graph.kt b/build-logic/convention/src/main/kotlin/com/google/samples/apps/nowinandroid/Graph.kt new file mode 100644 index 000000000..41c39c453 --- /dev/null +++ b/build-logic/convention/src/main/kotlin/com/google/samples/apps/nowinandroid/Graph.kt @@ -0,0 +1,279 @@ +/* + * Copyright 2025 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.samples.apps.nowinandroid + +import com.android.utils.associateWithNotNull +import com.google.samples.apps.nowinandroid.PluginType.Unknown +import org.gradle.api.DefaultTask +import org.gradle.api.Project +import org.gradle.api.artifacts.Configuration +import org.gradle.api.artifacts.ProjectDependency +import org.gradle.api.file.RegularFileProperty +import org.gradle.api.provider.MapProperty +import org.gradle.api.provider.Property +import org.gradle.api.tasks.CacheableTask +import org.gradle.api.tasks.Input +import org.gradle.api.tasks.InputFile +import org.gradle.api.tasks.OutputFile +import org.gradle.api.tasks.PathSensitive +import org.gradle.api.tasks.PathSensitivity.NONE +import org.gradle.api.tasks.TaskAction +import org.gradle.kotlin.dsl.assign +import org.gradle.kotlin.dsl.register +import org.gradle.kotlin.dsl.withType +import kotlin.text.RegexOption.DOT_MATCHES_ALL + +/** + * Generates module dependency graphs with `graphDump` task, and update the corresponding `README.md` file with `graphUpdate`. + * + * This is not an optimal implementation and could be improved if needed: + * - [Graph.invoke] is **recursively** searching through dependent projects (although in practice it will never reach a stack overflow). + * - [Graph.invoke] is entirely re-executed for all projects, without re-using intermediate values. + * - [Graph.invoke] is always executed during Gradle's Configuration phase (but takes in general less than 1 ms for a project). + * + * The resulting graphs can be configured with `graph.ignoredProjects` and `graph.supportedConfigurations` properties. + */ +private class Graph( + private val root: Project, + private val dependencies: MutableMap>> = mutableMapOf(), + private val plugins: MutableMap = mutableMapOf(), + private val seen: MutableSet = mutableSetOf(), +) { + + private val ignoredProjects = root.providers.gradleProperty("graph.ignoredProjects") + .map { it.split(",").toSet() } + .orElse(emptySet()) + private val supportedConfigurations = + root.providers.gradleProperty("graph.supportedConfigurations") + .map { it.split(",").toSet() } + .orElse(setOf("api", "implementation", "baselineProfile", "testedApks")) + + operator fun invoke(project: Project = root): Graph { + if (project.path in seen) return this + seen += project.path + plugins.putIfAbsent( + project, + PluginType.entries.firstOrNull { project.pluginManager.hasPlugin(it.id) } ?: Unknown, + ) + dependencies.compute(project) { _, u -> u.orEmpty() } + project.configurations + .matching { it.name in supportedConfigurations.get() } + .associateWithNotNull { it.dependencies.withType().ifEmpty { null } } + .flatMap { (c, value) -> value.map { dep -> c to project.project(dep.path) } } + .filter { (_, p) -> p.path !in ignoredProjects.get() } + .forEach { (configuration: Configuration, projectDependency: Project) -> + dependencies.compute(project) { _, u -> u.orEmpty() + (configuration to projectDependency) } + invoke(projectDependency) + } + return this + } + + fun dependencies(): Map>> = dependencies + .mapKeys { it.key.path } + .mapValues { it.value.mapTo(mutableSetOf()) { (c, p) -> c.name to p.path } } + + fun plugins() = plugins.mapKeys { it.key.path } +} + +/** + * Declaration order is important, as only the first match will be retained. + */ +internal enum class PluginType(val id: String, val ref: String, val style: String) { + AndroidApplication( + id = "com.android.application", + ref = "android-application", + style = "fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff", + ), + AndroidLibrary( + id = "com.android.library", + ref = "android-library", + style = "fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff", + ), + AndroidTest( + id = "com.android.test", + ref = "android-test", + style = "fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff", + ), + Jvm( + id = "org.jetbrains.kotlin.jvm", + ref = "jvm", + style = "fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff", + ), + Unknown( + id = "?", + ref = "unknown", + style = "fill:#FF0000,stroke:#fff,stroke-width:2px,color:#fff", + ), +} + +fun Project.configureGraphTasks() { + val dumpTask = tasks.register("graphDump") { + val graph = Graph(this@configureGraphTasks).invoke() + projectPath = this@configureGraphTasks.path + dependencies = graph.dependencies() + plugins = graph.plugins() + output = this@configureGraphTasks.layout.buildDirectory.file("mermaid.txt") + } + tasks.register("graphUpdate") { + projectPath = this@configureGraphTasks.path + input = dumpTask.flatMap { it.output } + output = this@configureGraphTasks.layout.projectDirectory.file("README.md") + } +} + +@CacheableTask +private abstract class GraphDumpTask : DefaultTask() { + + @get:Input + abstract val projectPath: Property + + @get:Input + abstract val dependencies: MapProperty>> + + @get:Input + abstract val plugins: MapProperty + + @get:OutputFile + abstract val output: RegularFileProperty + + override fun getDescription() = "Dumps project dependencies to a mermaid file." + + @TaskAction + operator fun invoke() { + output.get().asFile.writeText(mermaid()) + logger.lifecycle(output.get().asFile.toPath().toUri().toString()) + } + + private fun mermaid() = buildString { + val dependencies: Set = dependencies.get() + .flatMapTo(mutableSetOf()) { (project, entries) -> entries.map { it.toDependency(project) } } + // FrontMatter configuration (not supported yet on GitHub.com) + appendLine( + // language=YAML + """ + --- + config: + layout: elk + elk: + nodePlacementStrategy: SIMPLE + --- + """.trimIndent(), + ) + // Graph declaration + appendLine("graph TB") + // Nodes and subgraphs (limited to a single nested layer) + val (rootProjects, nestedProjects) = dependencies + .map { listOf(it.project, it.dependency) }.flatten().toSet() + .plus(projectPath.get()) // Special case when this specific module has no other dependency + .groupBy { it.substringBeforeLast(":") } + .entries.partition { it.key.isEmpty() } + nestedProjects.sortedByDescending { it.value.size }.forEach { (group, projects) -> + appendLine(" subgraph $group") + appendLine(" direction TB") + projects.sorted().forEach { + appendLine(it.alias(indent = 4, plugins.get().getValue(it))) + } + appendLine(" end") + } + rootProjects.flatMap { it.value }.sortedDescending().forEach { + appendLine(it.alias(indent = 2, plugins.get().getValue(it))) + } + // Links + if (dependencies.isNotEmpty()) appendLine() + dependencies + .sortedWith(compareBy({ it.project }, { it.dependency }, { it.configuration })) + .forEach { appendLine(it.link(indent = 2)) } + // Classes + appendLine() + PluginType.entries.forEach { appendLine(it.classDef()) } + } + + private class Dependency(val project: String, val configuration: String, val dependency: String) + + private fun Pair.toDependency(project: String) = + Dependency(project, configuration = first, dependency = second) + + private fun String.alias(indent: Int, pluginType: PluginType): String = buildString { + append(" ".repeat(indent)) + append(this@alias) + append("[").append(substringAfterLast(":")).append("]:::") + append(pluginType.ref) + } + + private fun Dependency.link(indent: Int) = buildString { + append(" ".repeat(indent)) + append(project).append(" ") + append( + when (configuration) { + "api" -> "--->" + "implementation" -> "-.->" + else -> "-.->|$configuration|" + }, + ) + append(" ").append(dependency) + } + + private fun PluginType.classDef() = "classDef $ref $style;" +} + +@CacheableTask +private abstract class GraphUpdateTask : DefaultTask() { + + @get:Input + abstract val projectPath: Property + + @get:InputFile + @get:PathSensitive(NONE) + abstract val input: RegularFileProperty + + @get:OutputFile + abstract val output: RegularFileProperty + + override fun getDescription() = "Updates Markdown file with the corresponding dependency graph." + + @TaskAction + operator fun invoke() = with(output.get().asFile) { + if (!exists()) { + createNewFile() + writeText( + """ + # `${projectPath.get()}` + + + + """.trimIndent(), + ) + } + val regex = """()(.*?)()""".toRegex(DOT_MATCHES_ALL) + val text = readText().replace(regex) { match -> + val (start, _, end) = match.destructured + val mermaid = input.get().asFile.readText().trimTrailingNewLines() + """ + |$start + |```mermaid + |$mermaid + |``` + |$end + """.trimMargin() + } + writeText(text) + } + + private fun String.trimTrailingNewLines() = lines() + .dropLastWhile(String::isBlank) + .joinToString(System.lineSeparator()) +} From 0156c82090305c2fdf0167f6fcf61a52346ef03c Mon Sep 17 00:00:00 2001 From: Simon Marquis Date: Sun, 31 Aug 2025 14:08:20 +0200 Subject: [PATCH 2/6] Remove `com.jraska.module.graph.assertion` plugin --- build.gradle.kts | 1 - gradle/libs.versions.toml | 2 -- 2 files changed, 3 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index b7989bab4..c61794f1f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -60,5 +60,4 @@ plugins { alias(libs.plugins.roborazzi) apply false alias(libs.plugins.secrets) apply false alias(libs.plugins.room) apply false - alias(libs.plugins.module.graph) apply true // Plugin applied to allow module graph generation } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 81f12c480..b5cd7df15 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -47,7 +47,6 @@ kotlinxCoroutines = "1.10.1" kotlinxDatetime = "0.6.1" kotlinxSerializationJson = "1.8.0" ksp = "2.1.10-1.0.31" -moduleGraph = "2.7.1" okhttp = "4.12.0" protobuf = "4.29.2" protobufPlugin = "0.9.4" @@ -177,7 +176,6 @@ hilt = { id = "com.google.dagger.hilt.android", version.ref = "hilt" } kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" } -module-graph = { id = "com.jraska.module.graph.assertion", version.ref = "moduleGraph" } protobuf = { id = "com.google.protobuf", version.ref = "protobufPlugin" } roborazzi = { id = "io.github.takahirom.roborazzi", version.ref = "roborazzi" } room = { id = "androidx.room", version.ref = "room" } From e079e68815b1837a6aed188bc82c3a3bda8f8a00 Mon Sep 17 00:00:00 2001 From: Simon Marquis Date: Sun, 31 Aug 2025 14:14:57 +0200 Subject: [PATCH 3/6] Delete old graphs --- app-nia-catalog/README.md | 3 - app/README.md | 3 - core/analytics/README.md | 3 - core/common/README.md | 3 - core/data-test/README.md | 3 - core/data/README.md | 3 - core/database/README.md | 3 - core/datastore-proto/README.md | 3 - core/datastore-test/README.md | 3 - core/datastore/README.md | 3 - core/designsystem/README.md | 3 - core/domain/README.md | 3 - core/model/README.md | 3 - core/network/README.md | 3 - core/notifications/README.md | 3 - core/screenshot-testing/README.md | 3 - core/testing/README.md | 3 - core/ui/README.md | 3 - docs/images/graphs/dep_graph_app.svg | 305 ------------------ .../graphs/dep_graph_app_nia_catalog.svg | 45 --- .../graphs/dep_graph_core_analytics.svg | 9 - docs/images/graphs/dep_graph_core_common.svg | 9 - docs/images/graphs/dep_graph_core_data.svg | 97 ------ .../graphs/dep_graph_core_data_test.svg | 105 ------ .../images/graphs/dep_graph_core_database.svg | 17 - .../graphs/dep_graph_core_datastore.svg | 33 -- .../graphs/dep_graph_core_datastore_proto.svg | 9 - .../graphs/dep_graph_core_datastore_test.svg | 45 --- .../graphs/dep_graph_core_designsystem.svg | 9 - docs/images/graphs/dep_graph_core_domain.svg | 109 ------- docs/images/graphs/dep_graph_core_model.svg | 9 - docs/images/graphs/dep_graph_core_network.svg | 25 -- .../graphs/dep_graph_core_notifications.svg | 25 -- .../dep_graph_core_screenshot_testing.svg | 17 - docs/images/graphs/dep_graph_core_testing.svg | 121 ------- docs/images/graphs/dep_graph_core_ui.svg | 33 -- .../graphs/dep_graph_feature_bookmarks.svg | 133 -------- .../graphs/dep_graph_feature_foryou.svg | 149 --------- .../graphs/dep_graph_feature_interests.svg | 149 --------- .../graphs/dep_graph_feature_search.svg | 149 --------- .../graphs/dep_graph_feature_settings.svg | 133 -------- .../images/graphs/dep_graph_feature_topic.svg | 133 -------- .../graphs/dep_graph_sync_sync_test.svg | 121 ------- docs/images/graphs/dep_graph_sync_work.svg | 109 ------- feature/bookmarks/README.md | 3 - feature/foryou/README.md | 3 - feature/interests/README.md | 3 - feature/search/README.md | 3 - feature/settings/README.md | 3 - feature/topic/README.md | 3 - generateModuleGraphs.sh | 131 -------- sync/sync-test/README.md | 3 - sync/work/README.md | 3 - 53 files changed, 2307 deletions(-) delete mode 100644 app-nia-catalog/README.md delete mode 100644 app/README.md delete mode 100644 core/analytics/README.md delete mode 100644 core/common/README.md delete mode 100644 core/data-test/README.md delete mode 100644 core/data/README.md delete mode 100644 core/database/README.md delete mode 100644 core/datastore-proto/README.md delete mode 100644 core/datastore-test/README.md delete mode 100644 core/datastore/README.md delete mode 100644 core/designsystem/README.md delete mode 100644 core/domain/README.md delete mode 100644 core/model/README.md delete mode 100644 core/network/README.md delete mode 100644 core/notifications/README.md delete mode 100644 core/screenshot-testing/README.md delete mode 100644 core/testing/README.md delete mode 100644 core/ui/README.md delete mode 100644 docs/images/graphs/dep_graph_app.svg delete mode 100644 docs/images/graphs/dep_graph_app_nia_catalog.svg delete mode 100644 docs/images/graphs/dep_graph_core_analytics.svg delete mode 100644 docs/images/graphs/dep_graph_core_common.svg delete mode 100644 docs/images/graphs/dep_graph_core_data.svg delete mode 100644 docs/images/graphs/dep_graph_core_data_test.svg delete mode 100644 docs/images/graphs/dep_graph_core_database.svg delete mode 100644 docs/images/graphs/dep_graph_core_datastore.svg delete mode 100644 docs/images/graphs/dep_graph_core_datastore_proto.svg delete mode 100644 docs/images/graphs/dep_graph_core_datastore_test.svg delete mode 100644 docs/images/graphs/dep_graph_core_designsystem.svg delete mode 100644 docs/images/graphs/dep_graph_core_domain.svg delete mode 100644 docs/images/graphs/dep_graph_core_model.svg delete mode 100644 docs/images/graphs/dep_graph_core_network.svg delete mode 100644 docs/images/graphs/dep_graph_core_notifications.svg delete mode 100644 docs/images/graphs/dep_graph_core_screenshot_testing.svg delete mode 100644 docs/images/graphs/dep_graph_core_testing.svg delete mode 100644 docs/images/graphs/dep_graph_core_ui.svg delete mode 100644 docs/images/graphs/dep_graph_feature_bookmarks.svg delete mode 100644 docs/images/graphs/dep_graph_feature_foryou.svg delete mode 100644 docs/images/graphs/dep_graph_feature_interests.svg delete mode 100644 docs/images/graphs/dep_graph_feature_search.svg delete mode 100644 docs/images/graphs/dep_graph_feature_settings.svg delete mode 100644 docs/images/graphs/dep_graph_feature_topic.svg delete mode 100644 docs/images/graphs/dep_graph_sync_sync_test.svg delete mode 100644 docs/images/graphs/dep_graph_sync_work.svg delete mode 100644 feature/bookmarks/README.md delete mode 100644 feature/foryou/README.md delete mode 100644 feature/interests/README.md delete mode 100644 feature/search/README.md delete mode 100644 feature/settings/README.md delete mode 100644 feature/topic/README.md delete mode 100755 generateModuleGraphs.sh delete mode 100644 sync/sync-test/README.md delete mode 100644 sync/work/README.md diff --git a/app-nia-catalog/README.md b/app-nia-catalog/README.md deleted file mode 100644 index cf6d05f4f..000000000 --- a/app-nia-catalog/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# :app-nia-catalog module -## Dependency graph -![Dependency graph](../docs/images/graphs/dep_graph_app_nia_catalog.svg) diff --git a/app/README.md b/app/README.md deleted file mode 100644 index a3fb4572a..000000000 --- a/app/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# :app module -## Dependency graph -![Dependency graph](../docs/images/graphs/dep_graph_app.svg) diff --git a/core/analytics/README.md b/core/analytics/README.md deleted file mode 100644 index d2bcd1ea7..000000000 --- a/core/analytics/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# :core:analytics module -## Dependency graph -![Dependency graph](../../docs/images/graphs/dep_graph_core_analytics.svg) diff --git a/core/common/README.md b/core/common/README.md deleted file mode 100644 index 96558bcc6..000000000 --- a/core/common/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# :core:common module -## Dependency graph -![Dependency graph](../../docs/images/graphs/dep_graph_core_common.svg) diff --git a/core/data-test/README.md b/core/data-test/README.md deleted file mode 100644 index 977ee10e4..000000000 --- a/core/data-test/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# :core:data-test module -## Dependency graph -![Dependency graph](../../docs/images/graphs/dep_graph_core_data_test.svg) diff --git a/core/data/README.md b/core/data/README.md deleted file mode 100644 index 5d30f1638..000000000 --- a/core/data/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# :core:data module -## Dependency graph -![Dependency graph](../../docs/images/graphs/dep_graph_core_data.svg) diff --git a/core/database/README.md b/core/database/README.md deleted file mode 100644 index 855eab53e..000000000 --- a/core/database/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# :core:database module -## Dependency graph -![Dependency graph](../../docs/images/graphs/dep_graph_core_database.svg) diff --git a/core/datastore-proto/README.md b/core/datastore-proto/README.md deleted file mode 100644 index 19ed58239..000000000 --- a/core/datastore-proto/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# :core:datastore-proto module -## Dependency graph -![Dependency graph](../../docs/images/graphs/dep_graph_core_datastore_proto.svg) diff --git a/core/datastore-test/README.md b/core/datastore-test/README.md deleted file mode 100644 index 99cf13f1f..000000000 --- a/core/datastore-test/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# :core:datastore-test module -## Dependency graph -![Dependency graph](../../docs/images/graphs/dep_graph_core_datastore_test.svg) diff --git a/core/datastore/README.md b/core/datastore/README.md deleted file mode 100644 index 4785c5885..000000000 --- a/core/datastore/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# :core:datastore module -## Dependency graph -![Dependency graph](../../docs/images/graphs/dep_graph_core_datastore.svg) diff --git a/core/designsystem/README.md b/core/designsystem/README.md deleted file mode 100644 index d1778cb14..000000000 --- a/core/designsystem/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# :core:designsystem module -## Dependency graph -![Dependency graph](../../docs/images/graphs/dep_graph_core_designsystem.svg) diff --git a/core/domain/README.md b/core/domain/README.md deleted file mode 100644 index cc6905846..000000000 --- a/core/domain/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# :core:domain module -## Dependency graph -![Dependency graph](../../docs/images/graphs/dep_graph_core_domain.svg) diff --git a/core/model/README.md b/core/model/README.md deleted file mode 100644 index efd0eec76..000000000 --- a/core/model/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# :core:model module -## Dependency graph -![Dependency graph](../../docs/images/graphs/dep_graph_core_model.svg) diff --git a/core/network/README.md b/core/network/README.md deleted file mode 100644 index 516aa2d38..000000000 --- a/core/network/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# :core:network module -## Dependency graph -![Dependency graph](../../docs/images/graphs/dep_graph_core_network.svg) diff --git a/core/notifications/README.md b/core/notifications/README.md deleted file mode 100644 index 8f5607bdf..000000000 --- a/core/notifications/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# :core:notifications module -## Dependency graph -![Dependency graph](../../docs/images/graphs/dep_graph_core_notifications.svg) diff --git a/core/screenshot-testing/README.md b/core/screenshot-testing/README.md deleted file mode 100644 index 9bd4f1f9c..000000000 --- a/core/screenshot-testing/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# :core:screenshot-testing module -## Dependency graph -![Dependency graph](../../docs/images/graphs/dep_graph_core_screenshot_testing.svg) diff --git a/core/testing/README.md b/core/testing/README.md deleted file mode 100644 index 5a35d379b..000000000 --- a/core/testing/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# :core:testing module -## Dependency graph -![Dependency graph](../../docs/images/graphs/dep_graph_core_testing.svg) diff --git a/core/ui/README.md b/core/ui/README.md deleted file mode 100644 index 38e514d01..000000000 --- a/core/ui/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# :core:ui module -## Dependency graph -![Dependency graph](../../docs/images/graphs/dep_graph_core_ui.svg) diff --git a/docs/images/graphs/dep_graph_app.svg b/docs/images/graphs/dep_graph_app.svg deleted file mode 100644 index 8e5d9d429..000000000 --- a/docs/images/graphs/dep_graph_app.svg +++ /dev/null @@ -1,305 +0,0 @@ - - - - - - :app - - - - :feature:interests - - - - - - - - :feature:foryou - - - - - - - - :feature:bookmarks - - - - - - - - :feature:topic - - - - - - - - :feature:search - - - - - - - - :feature:settings - - - - - - - - :core:common - - - - - - - - :core:ui - - - - - - - - :core:designsystem - - - - - - - - :core:data - - - - - - - - :core:model - - - - - - - - :core:analytics - - - - - - - - :sync:work - - - - - - - - - - - - - - - - - - - - :core:domain - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - :core:database - - - - - - - - :core:datastore - - - - - - - - :core:network - - - - - - - - :core:notifications - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - :core:datastore-proto - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/images/graphs/dep_graph_app_nia_catalog.svg b/docs/images/graphs/dep_graph_app_nia_catalog.svg deleted file mode 100644 index 151ee63ad..000000000 --- a/docs/images/graphs/dep_graph_app_nia_catalog.svg +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - :app-nia-catalog - - - - :core:designsystem - - - - - - - - :core:ui - - - - - - - - - - - - :core:analytics - - - - - - - - :core:model - - - - - - - diff --git a/docs/images/graphs/dep_graph_core_analytics.svg b/docs/images/graphs/dep_graph_core_analytics.svg deleted file mode 100644 index 45f1c1eb0..000000000 --- a/docs/images/graphs/dep_graph_core_analytics.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - :core:analytics - - - diff --git a/docs/images/graphs/dep_graph_core_common.svg b/docs/images/graphs/dep_graph_core_common.svg deleted file mode 100644 index 91033eaa0..000000000 --- a/docs/images/graphs/dep_graph_core_common.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - :core:common - - - diff --git a/docs/images/graphs/dep_graph_core_data.svg b/docs/images/graphs/dep_graph_core_data.svg deleted file mode 100644 index ab91bafb2..000000000 --- a/docs/images/graphs/dep_graph_core_data.svg +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - :core:data - - - - :core:common - - - - - - - - :core:database - - - - - - - - :core:datastore - - - - - - - - :core:network - - - - - - - - :core:analytics - - - - - - - - :core:notifications - - - - - - - - :core:model - - - - - - - - - - - - - - - - :core:datastore-proto - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/images/graphs/dep_graph_core_data_test.svg b/docs/images/graphs/dep_graph_core_data_test.svg deleted file mode 100644 index b9736c859..000000000 --- a/docs/images/graphs/dep_graph_core_data_test.svg +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - :core:data-test - - - - :core:data - - - - - - - - :core:common - - - - - - - - :core:database - - - - - - - - :core:datastore - - - - - - - - :core:network - - - - - - - - :core:analytics - - - - - - - - :core:notifications - - - - - - - - :core:model - - - - - - - - - - - - - - - - :core:datastore-proto - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/images/graphs/dep_graph_core_database.svg b/docs/images/graphs/dep_graph_core_database.svg deleted file mode 100644 index e82d46436..000000000 --- a/docs/images/graphs/dep_graph_core_database.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - :core:database - - - - :core:model - - - - - - - diff --git a/docs/images/graphs/dep_graph_core_datastore.svg b/docs/images/graphs/dep_graph_core_datastore.svg deleted file mode 100644 index f7502e55b..000000000 --- a/docs/images/graphs/dep_graph_core_datastore.svg +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - :core:datastore - - - - :core:datastore-proto - - - - - - - - :core:model - - - - - - - - :core:common - - - - - - - diff --git a/docs/images/graphs/dep_graph_core_datastore_proto.svg b/docs/images/graphs/dep_graph_core_datastore_proto.svg deleted file mode 100644 index 7fcfb8358..000000000 --- a/docs/images/graphs/dep_graph_core_datastore_proto.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - :core:datastore-proto - - - diff --git a/docs/images/graphs/dep_graph_core_datastore_test.svg b/docs/images/graphs/dep_graph_core_datastore_test.svg deleted file mode 100644 index 37521a05f..000000000 --- a/docs/images/graphs/dep_graph_core_datastore_test.svg +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - :core:datastore-test - - - - :core:common - - - - - - - - :core:datastore - - - - - - - - - - - - :core:datastore-proto - - - - - - - - :core:model - - - - - - - diff --git a/docs/images/graphs/dep_graph_core_designsystem.svg b/docs/images/graphs/dep_graph_core_designsystem.svg deleted file mode 100644 index 737140876..000000000 --- a/docs/images/graphs/dep_graph_core_designsystem.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - :core:designsystem - - - diff --git a/docs/images/graphs/dep_graph_core_domain.svg b/docs/images/graphs/dep_graph_core_domain.svg deleted file mode 100644 index fe3740d2f..000000000 --- a/docs/images/graphs/dep_graph_core_domain.svg +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - :core:domain - - - - :core:data - - - - - - - - :core:model - - - - - - - - :core:common - - - - - - - - :core:database - - - - - - - - :core:datastore - - - - - - - - :core:network - - - - - - - - :core:analytics - - - - - - - - :core:notifications - - - - - - - - - - - - - - - - - - - - :core:datastore-proto - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/images/graphs/dep_graph_core_model.svg b/docs/images/graphs/dep_graph_core_model.svg deleted file mode 100644 index 125684a08..000000000 --- a/docs/images/graphs/dep_graph_core_model.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - :core:model - - - diff --git a/docs/images/graphs/dep_graph_core_network.svg b/docs/images/graphs/dep_graph_core_network.svg deleted file mode 100644 index 3022a86ee..000000000 --- a/docs/images/graphs/dep_graph_core_network.svg +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - :core:network - - - - :core:common - - - - - - - - :core:model - - - - - - - diff --git a/docs/images/graphs/dep_graph_core_notifications.svg b/docs/images/graphs/dep_graph_core_notifications.svg deleted file mode 100644 index d96d28769..000000000 --- a/docs/images/graphs/dep_graph_core_notifications.svg +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - :core:notifications - - - - :core:model - - - - - - - - :core:common - - - - - - - diff --git a/docs/images/graphs/dep_graph_core_screenshot_testing.svg b/docs/images/graphs/dep_graph_core_screenshot_testing.svg deleted file mode 100644 index a7d58b0ea..000000000 --- a/docs/images/graphs/dep_graph_core_screenshot_testing.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - :core:screenshot-testing - - - - :core:designsystem - - - - - - - diff --git a/docs/images/graphs/dep_graph_core_testing.svg b/docs/images/graphs/dep_graph_core_testing.svg deleted file mode 100644 index d441858e5..000000000 --- a/docs/images/graphs/dep_graph_core_testing.svg +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - :core:testing - - - - :core:analytics - - - - - - - - :core:common - - - - - - - - :core:data - - - - - - - - :core:model - - - - - - - - :core:notifications - - - - - - - - - - - - - - - - - - - - :core:database - - - - - - - - :core:datastore - - - - - - - - :core:network - - - - - - - - - - - - - - - - - - - - - - - - - - - - :core:datastore-proto - - - - - - - - - - - - - - - diff --git a/docs/images/graphs/dep_graph_core_ui.svg b/docs/images/graphs/dep_graph_core_ui.svg deleted file mode 100644 index 2cd972357..000000000 --- a/docs/images/graphs/dep_graph_core_ui.svg +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - :core:ui - - - - :core:analytics - - - - - - - - :core:designsystem - - - - - - - - :core:model - - - - - - - diff --git a/docs/images/graphs/dep_graph_feature_bookmarks.svg b/docs/images/graphs/dep_graph_feature_bookmarks.svg deleted file mode 100644 index 0391eb39c..000000000 --- a/docs/images/graphs/dep_graph_feature_bookmarks.svg +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - :feature:bookmarks - - - - :core:ui - - - - - - - - :core:designsystem - - - - - - - - :core:data - - - - - - - - - - - - :core:analytics - - - - - - - - :core:model - - - - - - - - - - - - :core:common - - - - - - - - :core:database - - - - - - - - :core:datastore - - - - - - - - :core:network - - - - - - - - :core:notifications - - - - - - - - - - - - - - - - - - - - :core:datastore-proto - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/images/graphs/dep_graph_feature_foryou.svg b/docs/images/graphs/dep_graph_feature_foryou.svg deleted file mode 100644 index 63a154a87..000000000 --- a/docs/images/graphs/dep_graph_feature_foryou.svg +++ /dev/null @@ -1,149 +0,0 @@ - - - - - - :feature:foryou - - - - :core:ui - - - - - - - - :core:designsystem - - - - - - - - :core:data - - - - - - - - :core:domain - - - - - - - - - - - - :core:analytics - - - - - - - - :core:model - - - - - - - - - - - - :core:common - - - - - - - - :core:database - - - - - - - - :core:datastore - - - - - - - - :core:network - - - - - - - - :core:notifications - - - - - - - - - - - - - - - - - - - - - - - - - - - - :core:datastore-proto - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/images/graphs/dep_graph_feature_interests.svg b/docs/images/graphs/dep_graph_feature_interests.svg deleted file mode 100644 index 2de1fc61f..000000000 --- a/docs/images/graphs/dep_graph_feature_interests.svg +++ /dev/null @@ -1,149 +0,0 @@ - - - - - - :feature:interests - - - - :core:ui - - - - - - - - :core:designsystem - - - - - - - - :core:data - - - - - - - - :core:domain - - - - - - - - - - - - :core:analytics - - - - - - - - :core:model - - - - - - - - - - - - :core:common - - - - - - - - :core:database - - - - - - - - :core:datastore - - - - - - - - :core:network - - - - - - - - :core:notifications - - - - - - - - - - - - - - - - - - - - - - - - - - - - :core:datastore-proto - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/images/graphs/dep_graph_feature_search.svg b/docs/images/graphs/dep_graph_feature_search.svg deleted file mode 100644 index 7f8f29777..000000000 --- a/docs/images/graphs/dep_graph_feature_search.svg +++ /dev/null @@ -1,149 +0,0 @@ - - - - - - :feature:search - - - - :core:ui - - - - - - - - :core:designsystem - - - - - - - - :core:data - - - - - - - - :core:domain - - - - - - - - - - - - :core:analytics - - - - - - - - :core:model - - - - - - - - - - - - :core:common - - - - - - - - :core:database - - - - - - - - :core:datastore - - - - - - - - :core:network - - - - - - - - :core:notifications - - - - - - - - - - - - - - - - - - - - - - - - - - - - :core:datastore-proto - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/images/graphs/dep_graph_feature_settings.svg b/docs/images/graphs/dep_graph_feature_settings.svg deleted file mode 100644 index 3f0d35df2..000000000 --- a/docs/images/graphs/dep_graph_feature_settings.svg +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - :feature:settings - - - - :core:ui - - - - - - - - :core:designsystem - - - - - - - - :core:data - - - - - - - - - - - - :core:analytics - - - - - - - - :core:model - - - - - - - - - - - - :core:common - - - - - - - - :core:database - - - - - - - - :core:datastore - - - - - - - - :core:network - - - - - - - - :core:notifications - - - - - - - - - - - - - - - - - - - - :core:datastore-proto - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/images/graphs/dep_graph_feature_topic.svg b/docs/images/graphs/dep_graph_feature_topic.svg deleted file mode 100644 index b7c7dd26c..000000000 --- a/docs/images/graphs/dep_graph_feature_topic.svg +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - :feature:topic - - - - :core:ui - - - - - - - - :core:designsystem - - - - - - - - :core:data - - - - - - - - - - - - :core:analytics - - - - - - - - :core:model - - - - - - - - - - - - :core:common - - - - - - - - :core:database - - - - - - - - :core:datastore - - - - - - - - :core:network - - - - - - - - :core:notifications - - - - - - - - - - - - - - - - - - - - :core:datastore-proto - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/images/graphs/dep_graph_sync_sync_test.svg b/docs/images/graphs/dep_graph_sync_sync_test.svg deleted file mode 100644 index 7a083ba54..000000000 --- a/docs/images/graphs/dep_graph_sync_sync_test.svg +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - :sync:sync-test - - - - :core:data - - - - - - - - :sync:work - - - - - - - - :core:common - - - - - - - - :core:database - - - - - - - - :core:datastore - - - - - - - - :core:network - - - - - - - - :core:analytics - - - - - - - - :core:notifications - - - - - - - - - - - - - - - - :core:model - - - - - - - - - - - - - - - - :core:datastore-proto - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/images/graphs/dep_graph_sync_work.svg b/docs/images/graphs/dep_graph_sync_work.svg deleted file mode 100644 index c649f2397..000000000 --- a/docs/images/graphs/dep_graph_sync_work.svg +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - :sync:work - - - - :core:analytics - - - - - - - - :core:data - - - - - - - - - - - - :core:common - - - - - - - - :core:database - - - - - - - - :core:datastore - - - - - - - - :core:network - - - - - - - - :core:notifications - - - - - - - - :core:model - - - - - - - - - - - - - - - - :core:datastore-proto - - - - - - - - - - - - - - - - - - - - - - - diff --git a/feature/bookmarks/README.md b/feature/bookmarks/README.md deleted file mode 100644 index 54cbf91d0..000000000 --- a/feature/bookmarks/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# :feature:bookmarks module -## Dependency graph -![Dependency graph](../../docs/images/graphs/dep_graph_feature_bookmarks.svg) diff --git a/feature/foryou/README.md b/feature/foryou/README.md deleted file mode 100644 index 0f08cb827..000000000 --- a/feature/foryou/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# :feature:foryou module -## Dependency graph -![Dependency graph](../../docs/images/graphs/dep_graph_feature_foryou.svg) diff --git a/feature/interests/README.md b/feature/interests/README.md deleted file mode 100644 index 90a4fbc9c..000000000 --- a/feature/interests/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# :feature:interests module -## Dependency graph -![Dependency graph](../../docs/images/graphs/dep_graph_feature_interests.svg) diff --git a/feature/search/README.md b/feature/search/README.md deleted file mode 100644 index e205970f0..000000000 --- a/feature/search/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# :feature:search module -## Dependency graph -![Dependency graph](../../docs/images/graphs/dep_graph_feature_search.svg) diff --git a/feature/settings/README.md b/feature/settings/README.md deleted file mode 100644 index 7a4df04fe..000000000 --- a/feature/settings/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# :feature:settings module -## Dependency graph -![Dependency graph](../../docs/images/graphs/dep_graph_feature_settings.svg) diff --git a/feature/topic/README.md b/feature/topic/README.md deleted file mode 100644 index 84588929c..000000000 --- a/feature/topic/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# :feature:topic module -## Dependency graph -![Dependency graph](../../docs/images/graphs/dep_graph_feature_topic.svg) diff --git a/generateModuleGraphs.sh b/generateModuleGraphs.sh deleted file mode 100755 index 5307d2932..000000000 --- a/generateModuleGraphs.sh +++ /dev/null @@ -1,131 +0,0 @@ -#!/bin/bash -# -# Copyright 2024 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# -# Script to generate dependency graphs for each of the modules. The --exclude-module parameter can -# be used to exclude modules which are not part of the root dependency graph (and which, if included -# would cause the script to fail. -# -# Usage: generateModuleGraphs.sh --exclude-module :benchmarks --exclude-module :lint --exclude-module :ui-test-hilt-manifest - -# Check if the dot command is available -if ! command -v dot &> /dev/null -then - echo "The 'dot' command is not found. This is required to generate SVGs from the Graphviz files." - echo "Installation instructions:" - echo " - On macOS: You can install Graphviz using Homebrew with the command: 'brew install graphviz'" - echo " - On Ubuntu: You can install Graphviz using APT with the command: 'sudo apt install graphviz'" - echo " - Others: Visit https://graphviz.org/download/" - exit 1 -fi - -# Check if the svgo command is available -if ! command -v svgo &> /dev/null -then - echo "The 'svgo' command is not found. This is required to cleanup and compress SVGs." - echo "Installation instructions available at https://github.com/svg/svgo." - exit 1 -fi - -# Check for a version of grep which supports Perl regex. -# On MacOS the OS installed grep doesn't support Perl regex so check for the existence of the -# GNU version instead which is prefixed with 'g' to distinguish it from the OS installed version. - if grep -P "" /dev/null > /dev/null 2>&1; then - GREP_COMMAND=grep -elif command -v ggrep &> /dev/null; then - GREP_COMMAND=ggrep -else - echo "You don't have a version of 'grep' installed which supports Perl regular expressions." - echo "On MacOS you can install one using Homebrew with the command: 'brew install grep'" - exit 1 -fi - -# Initialize an array to store excluded modules -excluded_modules=() - -# Parse command-line arguments for excluded modules -while [[ $# -gt 0 ]]; do - case "$1" in - --exclude-module) - excluded_modules+=("$2") - shift # Past argument - shift # Past value - ;; - *) - echo "Unknown parameter passed: $1" - exit 1 - ;; - esac -done - -# Get the module paths -module_paths=$(${GREP_COMMAND} -oP 'include\("\K[^"]+' settings.gradle.kts) - -# Ensure the output directory exists -mkdir -p docs/images/graphs/ - -# Function to check and create a README.md for modules which don't have one. -check_and_create_readme() { - local module_path="$1" - local file_name="$2" - - local readme_path="${module_path:1}" # Remove leading colon - readme_path=${readme_path//:/\/} # Replace colons with slashes - readme_path="${readme_path}/README.md" #Append the filename - - # Check if README.md exists and create it if not - if [[ ! -f "$readme_path" ]]; then - echo "Creating README.md for ${module_path}" - - # Determine the depth of the module based on the number of colons - local depth=$(awk -F: '{print NF-1}' <<< "${module_path}") - - # Construct the relative image path with the correct number of "../" - local relative_image_path="../" - for ((i=1; i<$depth; i++)); do - relative_image_path+="../" - done - relative_image_path+="docs/images/graphs/${file_name}.svg" - - echo "# ${module_path} module" > "$readme_path" - echo "## Dependency graph" >> "$readme_path" - echo "![Dependency graph](${relative_image_path})" >> "$readme_path" - fi -} - -# Loop through each module path -echo "$module_paths" | while read -r module_path; do - # Check if the module is in the excluded list - if [[ ! " ${excluded_modules[@]} " =~ " ${module_path} " ]]; then - # Derive the filename from the module path - file_name="dep_graph${module_path//:/_}" # Replace colons with underscores - file_name="${file_name//-/_}" # Replace dashes with underscores - - check_and_create_readme "$module_path" "$file_name" - - # Generate the .gv file in a temporary location - # Date: Sun, 31 Aug 2025 14:23:23 +0200 Subject: [PATCH 4/6] graphUpdate --- app-nia-catalog/README.md | 33 +++++++++ app/README.md | 109 ++++++++++++++++++++++++++++++ benchmarks/README.md | 109 ++++++++++++++++++++++++++++++ core/analytics/README.md | 23 +++++++ core/common/README.md | 23 +++++++ core/data-test/README.md | 48 +++++++++++++ core/data/README.md | 46 +++++++++++++ core/database/README.md | 26 +++++++ core/datastore-proto/README.md | 23 +++++++ core/datastore-test/README.md | 33 +++++++++ core/datastore/README.md | 30 ++++++++ core/designsystem/README.md | 23 +++++++ core/domain/README.md | 49 ++++++++++++++ core/model/README.md | 23 +++++++ core/network/README.md | 28 ++++++++ core/notifications/README.md | 28 ++++++++ core/screenshot-testing/README.md | 26 +++++++ core/testing/README.md | 52 ++++++++++++++ core/ui/README.md | 30 ++++++++ feature/bookmarks/README.md | 58 ++++++++++++++++ feature/foryou/README.md | 63 +++++++++++++++++ feature/interests/README.md | 62 +++++++++++++++++ feature/search/README.md | 62 +++++++++++++++++ feature/settings/README.md | 58 ++++++++++++++++ feature/topic/README.md | 58 ++++++++++++++++ sync/sync-test/README.md | 56 +++++++++++++++ sync/work/README.md | 53 +++++++++++++++ ui-test-hilt-manifest/README.md | 20 ++++++ 28 files changed, 1252 insertions(+) create mode 100644 app-nia-catalog/README.md create mode 100644 app/README.md create mode 100644 benchmarks/README.md create mode 100644 core/analytics/README.md create mode 100644 core/common/README.md create mode 100644 core/data-test/README.md create mode 100644 core/data/README.md create mode 100644 core/database/README.md create mode 100644 core/datastore-proto/README.md create mode 100644 core/datastore-test/README.md create mode 100644 core/datastore/README.md create mode 100644 core/designsystem/README.md create mode 100644 core/domain/README.md create mode 100644 core/model/README.md create mode 100644 core/network/README.md create mode 100644 core/notifications/README.md create mode 100644 core/screenshot-testing/README.md create mode 100644 core/testing/README.md create mode 100644 core/ui/README.md create mode 100644 feature/bookmarks/README.md create mode 100644 feature/foryou/README.md create mode 100644 feature/interests/README.md create mode 100644 feature/search/README.md create mode 100644 feature/settings/README.md create mode 100644 feature/topic/README.md create mode 100644 sync/sync-test/README.md create mode 100644 sync/work/README.md create mode 100644 ui-test-hilt-manifest/README.md diff --git a/app-nia-catalog/README.md b/app-nia-catalog/README.md new file mode 100644 index 000000000..a0b2bb6f6 --- /dev/null +++ b/app-nia-catalog/README.md @@ -0,0 +1,33 @@ +# `:app-nia-catalog` + + +```mermaid +--- +config: + layout: elk + elk: + nodePlacementStrategy: SIMPLE +--- +graph TB + subgraph :core + direction TB + :core:analytics[analytics]:::android-library + :core:designsystem[designsystem]:::android-library + :core:model[model]:::jvm + :core:ui[ui]:::android-library + end + :app-nia-catalog[app-nia-catalog]:::android-application + + :app-nia-catalog -.-> :core:designsystem + :app-nia-catalog -.-> :core:ui + :core:ui ---> :core:analytics + :core:ui ---> :core:designsystem + :core:ui ---> :core:model + +classDef android-application fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-library fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-test fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef jvm fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef unknown fill:#FF0000,stroke:#fff,stroke-width:2px,color:#fff; +``` + diff --git a/app/README.md b/app/README.md new file mode 100644 index 000000000..020aecd28 --- /dev/null +++ b/app/README.md @@ -0,0 +1,109 @@ +# `:app` + + +```mermaid +--- +config: + layout: elk + elk: + nodePlacementStrategy: SIMPLE +--- +graph TB + subgraph :core + direction TB + :core:analytics[analytics]:::android-library + :core:common[common]:::jvm + :core:data[data]:::android-library + :core:database[database]:::android-library + :core:datastore[datastore]:::android-library + :core:datastore-proto[datastore-proto]:::android-library + :core:designsystem[designsystem]:::android-library + :core:domain[domain]:::android-library + :core:model[model]:::jvm + :core:network[network]:::android-library + :core:notifications[notifications]:::android-library + :core:ui[ui]:::android-library + end + subgraph :feature + direction TB + :feature:bookmarks[bookmarks]:::android-library + :feature:foryou[foryou]:::android-library + :feature:interests[interests]:::android-library + :feature:search[search]:::android-library + :feature:settings[settings]:::android-library + :feature:topic[topic]:::android-library + end + subgraph :sync + direction TB + :sync:work[work]:::android-library + end + :benchmarks[benchmarks]:::android-test + :app[app]:::android-application + + :app -.->|baselineProfile| :benchmarks + :app -.-> :core:analytics + :app -.-> :core:common + :app -.-> :core:data + :app -.-> :core:designsystem + :app -.-> :core:model + :app -.-> :core:ui + :app -.-> :feature:bookmarks + :app -.-> :feature:foryou + :app -.-> :feature:interests + :app -.-> :feature:search + :app -.-> :feature:settings + :app -.-> :feature:topic + :app -.-> :sync:work + :benchmarks -.->|testedApks| :app + :core:data -.-> :core:analytics + :core:data ---> :core:common + :core:data ---> :core:database + :core:data ---> :core:datastore + :core:data ---> :core:network + :core:data -.-> :core:notifications + :core:database ---> :core:model + :core:datastore -.-> :core:common + :core:datastore ---> :core:datastore-proto + :core:datastore ---> :core:model + :core:domain ---> :core:data + :core:domain ---> :core:model + :core:network ---> :core:common + :core:network ---> :core:model + :core:notifications -.-> :core:common + :core:notifications ---> :core:model + :core:ui ---> :core:analytics + :core:ui ---> :core:designsystem + :core:ui ---> :core:model + :feature:bookmarks -.-> :core:data + :feature:bookmarks -.-> :core:designsystem + :feature:bookmarks -.-> :core:ui + :feature:foryou -.-> :core:data + :feature:foryou -.-> :core:designsystem + :feature:foryou -.-> :core:domain + :feature:foryou -.-> :core:notifications + :feature:foryou -.-> :core:ui + :feature:interests -.-> :core:data + :feature:interests -.-> :core:designsystem + :feature:interests -.-> :core:domain + :feature:interests -.-> :core:ui + :feature:search -.-> :core:data + :feature:search -.-> :core:designsystem + :feature:search -.-> :core:domain + :feature:search -.-> :core:ui + :feature:settings -.-> :core:data + :feature:settings -.-> :core:designsystem + :feature:settings -.-> :core:ui + :feature:topic -.-> :core:data + :feature:topic -.-> :core:designsystem + :feature:topic -.-> :core:ui + :sync:work -.-> :core:analytics + :sync:work -.-> :core:data + :sync:work -.-> :core:notifications + +classDef android-application fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-library fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-test fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef jvm fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef unknown fill:#FF0000,stroke:#fff,stroke-width:2px,color:#fff; +``` + diff --git a/benchmarks/README.md b/benchmarks/README.md new file mode 100644 index 000000000..6e91ce55d --- /dev/null +++ b/benchmarks/README.md @@ -0,0 +1,109 @@ +# `:benchmarks` + + +```mermaid +--- +config: + layout: elk + elk: + nodePlacementStrategy: SIMPLE +--- +graph TB + subgraph :core + direction TB + :core:analytics[analytics]:::android-library + :core:common[common]:::jvm + :core:data[data]:::android-library + :core:database[database]:::android-library + :core:datastore[datastore]:::android-library + :core:datastore-proto[datastore-proto]:::android-library + :core:designsystem[designsystem]:::android-library + :core:domain[domain]:::android-library + :core:model[model]:::jvm + :core:network[network]:::android-library + :core:notifications[notifications]:::android-library + :core:ui[ui]:::android-library + end + subgraph :feature + direction TB + :feature:bookmarks[bookmarks]:::android-library + :feature:foryou[foryou]:::android-library + :feature:interests[interests]:::android-library + :feature:search[search]:::android-library + :feature:settings[settings]:::android-library + :feature:topic[topic]:::android-library + end + subgraph :sync + direction TB + :sync:work[work]:::android-library + end + :benchmarks[benchmarks]:::android-test + :app[app]:::android-application + + :app -.->|baselineProfile| :benchmarks + :app -.-> :core:analytics + :app -.-> :core:common + :app -.-> :core:data + :app -.-> :core:designsystem + :app -.-> :core:model + :app -.-> :core:ui + :app -.-> :feature:bookmarks + :app -.-> :feature:foryou + :app -.-> :feature:interests + :app -.-> :feature:search + :app -.-> :feature:settings + :app -.-> :feature:topic + :app -.-> :sync:work + :benchmarks -.->|testedApks| :app + :core:data -.-> :core:analytics + :core:data ---> :core:common + :core:data ---> :core:database + :core:data ---> :core:datastore + :core:data ---> :core:network + :core:data -.-> :core:notifications + :core:database ---> :core:model + :core:datastore -.-> :core:common + :core:datastore ---> :core:datastore-proto + :core:datastore ---> :core:model + :core:domain ---> :core:data + :core:domain ---> :core:model + :core:network ---> :core:common + :core:network ---> :core:model + :core:notifications -.-> :core:common + :core:notifications ---> :core:model + :core:ui ---> :core:analytics + :core:ui ---> :core:designsystem + :core:ui ---> :core:model + :feature:bookmarks -.-> :core:data + :feature:bookmarks -.-> :core:designsystem + :feature:bookmarks -.-> :core:ui + :feature:foryou -.-> :core:data + :feature:foryou -.-> :core:designsystem + :feature:foryou -.-> :core:domain + :feature:foryou -.-> :core:notifications + :feature:foryou -.-> :core:ui + :feature:interests -.-> :core:data + :feature:interests -.-> :core:designsystem + :feature:interests -.-> :core:domain + :feature:interests -.-> :core:ui + :feature:search -.-> :core:data + :feature:search -.-> :core:designsystem + :feature:search -.-> :core:domain + :feature:search -.-> :core:ui + :feature:settings -.-> :core:data + :feature:settings -.-> :core:designsystem + :feature:settings -.-> :core:ui + :feature:topic -.-> :core:data + :feature:topic -.-> :core:designsystem + :feature:topic -.-> :core:ui + :sync:work -.-> :core:analytics + :sync:work -.-> :core:data + :sync:work -.-> :core:notifications + +classDef android-application fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-library fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-test fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef jvm fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef unknown fill:#FF0000,stroke:#fff,stroke-width:2px,color:#fff; +``` + diff --git a/core/analytics/README.md b/core/analytics/README.md new file mode 100644 index 000000000..7248d2078 --- /dev/null +++ b/core/analytics/README.md @@ -0,0 +1,23 @@ +# `:core:analytics` + + +```mermaid +--- +config: + layout: elk + elk: + nodePlacementStrategy: SIMPLE +--- +graph TB + subgraph :core + direction TB + :core:analytics[analytics]:::android-library + end + +classDef android-application fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-library fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-test fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef jvm fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef unknown fill:#FF0000,stroke:#fff,stroke-width:2px,color:#fff; +``` + diff --git a/core/common/README.md b/core/common/README.md new file mode 100644 index 000000000..fbb05367d --- /dev/null +++ b/core/common/README.md @@ -0,0 +1,23 @@ +# `:core:common` + + +```mermaid +--- +config: + layout: elk + elk: + nodePlacementStrategy: SIMPLE +--- +graph TB + subgraph :core + direction TB + :core:common[common]:::jvm + end + +classDef android-application fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-library fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-test fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef jvm fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef unknown fill:#FF0000,stroke:#fff,stroke-width:2px,color:#fff; +``` + diff --git a/core/data-test/README.md b/core/data-test/README.md new file mode 100644 index 000000000..a47212933 --- /dev/null +++ b/core/data-test/README.md @@ -0,0 +1,48 @@ +# `:core:data-test` + + +```mermaid +--- +config: + layout: elk + elk: + nodePlacementStrategy: SIMPLE +--- +graph TB + subgraph :core + direction TB + :core:analytics[analytics]:::android-library + :core:common[common]:::jvm + :core:data[data]:::android-library + :core:data-test[data-test]:::android-library + :core:database[database]:::android-library + :core:datastore[datastore]:::android-library + :core:datastore-proto[datastore-proto]:::android-library + :core:model[model]:::jvm + :core:network[network]:::android-library + :core:notifications[notifications]:::android-library + end + + :core:data -.-> :core:analytics + :core:data ---> :core:common + :core:data ---> :core:database + :core:data ---> :core:datastore + :core:data ---> :core:network + :core:data -.-> :core:notifications + :core:data-test ---> :core:data + :core:database ---> :core:model + :core:datastore -.-> :core:common + :core:datastore ---> :core:datastore-proto + :core:datastore ---> :core:model + :core:network ---> :core:common + :core:network ---> :core:model + :core:notifications -.-> :core:common + :core:notifications ---> :core:model + +classDef android-application fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-library fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-test fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef jvm fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef unknown fill:#FF0000,stroke:#fff,stroke-width:2px,color:#fff; +``` + diff --git a/core/data/README.md b/core/data/README.md new file mode 100644 index 000000000..fdf93793d --- /dev/null +++ b/core/data/README.md @@ -0,0 +1,46 @@ +# `:core:data` + + +```mermaid +--- +config: + layout: elk + elk: + nodePlacementStrategy: SIMPLE +--- +graph TB + subgraph :core + direction TB + :core:analytics[analytics]:::android-library + :core:common[common]:::jvm + :core:data[data]:::android-library + :core:database[database]:::android-library + :core:datastore[datastore]:::android-library + :core:datastore-proto[datastore-proto]:::android-library + :core:model[model]:::jvm + :core:network[network]:::android-library + :core:notifications[notifications]:::android-library + end + + :core:data -.-> :core:analytics + :core:data ---> :core:common + :core:data ---> :core:database + :core:data ---> :core:datastore + :core:data ---> :core:network + :core:data -.-> :core:notifications + :core:database ---> :core:model + :core:datastore -.-> :core:common + :core:datastore ---> :core:datastore-proto + :core:datastore ---> :core:model + :core:network ---> :core:common + :core:network ---> :core:model + :core:notifications -.-> :core:common + :core:notifications ---> :core:model + +classDef android-application fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-library fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-test fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef jvm fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef unknown fill:#FF0000,stroke:#fff,stroke-width:2px,color:#fff; +``` + diff --git a/core/database/README.md b/core/database/README.md new file mode 100644 index 000000000..cc3c5dd0d --- /dev/null +++ b/core/database/README.md @@ -0,0 +1,26 @@ +# `:core:database` + + +```mermaid +--- +config: + layout: elk + elk: + nodePlacementStrategy: SIMPLE +--- +graph TB + subgraph :core + direction TB + :core:database[database]:::android-library + :core:model[model]:::jvm + end + + :core:database ---> :core:model + +classDef android-application fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-library fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-test fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef jvm fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef unknown fill:#FF0000,stroke:#fff,stroke-width:2px,color:#fff; +``` + diff --git a/core/datastore-proto/README.md b/core/datastore-proto/README.md new file mode 100644 index 000000000..313935d82 --- /dev/null +++ b/core/datastore-proto/README.md @@ -0,0 +1,23 @@ +# `:core:datastore-proto` + + +```mermaid +--- +config: + layout: elk + elk: + nodePlacementStrategy: SIMPLE +--- +graph TB + subgraph :core + direction TB + :core:datastore-proto[datastore-proto]:::android-library + end + +classDef android-application fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-library fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-test fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef jvm fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef unknown fill:#FF0000,stroke:#fff,stroke-width:2px,color:#fff; +``` + diff --git a/core/datastore-test/README.md b/core/datastore-test/README.md new file mode 100644 index 000000000..453e7fe13 --- /dev/null +++ b/core/datastore-test/README.md @@ -0,0 +1,33 @@ +# `:core:datastore-test` + + +```mermaid +--- +config: + layout: elk + elk: + nodePlacementStrategy: SIMPLE +--- +graph TB + subgraph :core + direction TB + :core:common[common]:::jvm + :core:datastore[datastore]:::android-library + :core:datastore-proto[datastore-proto]:::android-library + :core:datastore-test[datastore-test]:::android-library + :core:model[model]:::jvm + end + + :core:datastore -.-> :core:common + :core:datastore ---> :core:datastore-proto + :core:datastore ---> :core:model + :core:datastore-test -.-> :core:common + :core:datastore-test -.-> :core:datastore + +classDef android-application fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-library fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-test fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef jvm fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef unknown fill:#FF0000,stroke:#fff,stroke-width:2px,color:#fff; +``` + diff --git a/core/datastore/README.md b/core/datastore/README.md new file mode 100644 index 000000000..32c1a2bdf --- /dev/null +++ b/core/datastore/README.md @@ -0,0 +1,30 @@ +# `:core:datastore` + + +```mermaid +--- +config: + layout: elk + elk: + nodePlacementStrategy: SIMPLE +--- +graph TB + subgraph :core + direction TB + :core:common[common]:::jvm + :core:datastore[datastore]:::android-library + :core:datastore-proto[datastore-proto]:::android-library + :core:model[model]:::jvm + end + + :core:datastore -.-> :core:common + :core:datastore ---> :core:datastore-proto + :core:datastore ---> :core:model + +classDef android-application fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-library fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-test fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef jvm fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef unknown fill:#FF0000,stroke:#fff,stroke-width:2px,color:#fff; +``` + diff --git a/core/designsystem/README.md b/core/designsystem/README.md new file mode 100644 index 000000000..f5fdc599d --- /dev/null +++ b/core/designsystem/README.md @@ -0,0 +1,23 @@ +# `:core:designsystem` + + +```mermaid +--- +config: + layout: elk + elk: + nodePlacementStrategy: SIMPLE +--- +graph TB + subgraph :core + direction TB + :core:designsystem[designsystem]:::android-library + end + +classDef android-application fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-library fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-test fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef jvm fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef unknown fill:#FF0000,stroke:#fff,stroke-width:2px,color:#fff; +``` + diff --git a/core/domain/README.md b/core/domain/README.md new file mode 100644 index 000000000..cacdc2467 --- /dev/null +++ b/core/domain/README.md @@ -0,0 +1,49 @@ +# `:core:domain` + + +```mermaid +--- +config: + layout: elk + elk: + nodePlacementStrategy: SIMPLE +--- +graph TB + subgraph :core + direction TB + :core:analytics[analytics]:::android-library + :core:common[common]:::jvm + :core:data[data]:::android-library + :core:database[database]:::android-library + :core:datastore[datastore]:::android-library + :core:datastore-proto[datastore-proto]:::android-library + :core:domain[domain]:::android-library + :core:model[model]:::jvm + :core:network[network]:::android-library + :core:notifications[notifications]:::android-library + end + + :core:data -.-> :core:analytics + :core:data ---> :core:common + :core:data ---> :core:database + :core:data ---> :core:datastore + :core:data ---> :core:network + :core:data -.-> :core:notifications + :core:database ---> :core:model + :core:datastore -.-> :core:common + :core:datastore ---> :core:datastore-proto + :core:datastore ---> :core:model + :core:domain ---> :core:data + :core:domain ---> :core:model + :core:network ---> :core:common + :core:network ---> :core:model + :core:notifications -.-> :core:common + :core:notifications ---> :core:model + +classDef android-application fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-library fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-test fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef jvm fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef unknown fill:#FF0000,stroke:#fff,stroke-width:2px,color:#fff; +``` + diff --git a/core/model/README.md b/core/model/README.md new file mode 100644 index 000000000..11db83b5a --- /dev/null +++ b/core/model/README.md @@ -0,0 +1,23 @@ +# `:core:model` + + +```mermaid +--- +config: + layout: elk + elk: + nodePlacementStrategy: SIMPLE +--- +graph TB + subgraph :core + direction TB + :core:model[model]:::jvm + end + +classDef android-application fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-library fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-test fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef jvm fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef unknown fill:#FF0000,stroke:#fff,stroke-width:2px,color:#fff; +``` + diff --git a/core/network/README.md b/core/network/README.md new file mode 100644 index 000000000..807907b8d --- /dev/null +++ b/core/network/README.md @@ -0,0 +1,28 @@ +# `:core:network` + + +```mermaid +--- +config: + layout: elk + elk: + nodePlacementStrategy: SIMPLE +--- +graph TB + subgraph :core + direction TB + :core:common[common]:::jvm + :core:model[model]:::jvm + :core:network[network]:::android-library + end + + :core:network ---> :core:common + :core:network ---> :core:model + +classDef android-application fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-library fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-test fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef jvm fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef unknown fill:#FF0000,stroke:#fff,stroke-width:2px,color:#fff; +``` + diff --git a/core/notifications/README.md b/core/notifications/README.md new file mode 100644 index 000000000..7328236c8 --- /dev/null +++ b/core/notifications/README.md @@ -0,0 +1,28 @@ +# `:core:notifications` + + +```mermaid +--- +config: + layout: elk + elk: + nodePlacementStrategy: SIMPLE +--- +graph TB + subgraph :core + direction TB + :core:common[common]:::jvm + :core:model[model]:::jvm + :core:notifications[notifications]:::android-library + end + + :core:notifications -.-> :core:common + :core:notifications ---> :core:model + +classDef android-application fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-library fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-test fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef jvm fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef unknown fill:#FF0000,stroke:#fff,stroke-width:2px,color:#fff; +``` + diff --git a/core/screenshot-testing/README.md b/core/screenshot-testing/README.md new file mode 100644 index 000000000..1e5c91e89 --- /dev/null +++ b/core/screenshot-testing/README.md @@ -0,0 +1,26 @@ +# `:core:screenshot-testing` + + +```mermaid +--- +config: + layout: elk + elk: + nodePlacementStrategy: SIMPLE +--- +graph TB + subgraph :core + direction TB + :core:designsystem[designsystem]:::android-library + :core:screenshot-testing[screenshot-testing]:::android-library + end + + :core:screenshot-testing -.-> :core:designsystem + +classDef android-application fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-library fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-test fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef jvm fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef unknown fill:#FF0000,stroke:#fff,stroke-width:2px,color:#fff; +``` + diff --git a/core/testing/README.md b/core/testing/README.md new file mode 100644 index 000000000..9eb74ed24 --- /dev/null +++ b/core/testing/README.md @@ -0,0 +1,52 @@ +# `:core:testing` + + +```mermaid +--- +config: + layout: elk + elk: + nodePlacementStrategy: SIMPLE +--- +graph TB + subgraph :core + direction TB + :core:analytics[analytics]:::android-library + :core:common[common]:::jvm + :core:data[data]:::android-library + :core:database[database]:::android-library + :core:datastore[datastore]:::android-library + :core:datastore-proto[datastore-proto]:::android-library + :core:model[model]:::jvm + :core:network[network]:::android-library + :core:notifications[notifications]:::android-library + :core:testing[testing]:::android-library + end + + :core:data -.-> :core:analytics + :core:data ---> :core:common + :core:data ---> :core:database + :core:data ---> :core:datastore + :core:data ---> :core:network + :core:data -.-> :core:notifications + :core:database ---> :core:model + :core:datastore -.-> :core:common + :core:datastore ---> :core:datastore-proto + :core:datastore ---> :core:model + :core:network ---> :core:common + :core:network ---> :core:model + :core:notifications -.-> :core:common + :core:notifications ---> :core:model + :core:testing ---> :core:analytics + :core:testing ---> :core:common + :core:testing ---> :core:data + :core:testing ---> :core:model + :core:testing ---> :core:notifications + +classDef android-application fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-library fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-test fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef jvm fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef unknown fill:#FF0000,stroke:#fff,stroke-width:2px,color:#fff; +``` + diff --git a/core/ui/README.md b/core/ui/README.md new file mode 100644 index 000000000..2e1d324af --- /dev/null +++ b/core/ui/README.md @@ -0,0 +1,30 @@ +# `:core:ui` + + +```mermaid +--- +config: + layout: elk + elk: + nodePlacementStrategy: SIMPLE +--- +graph TB + subgraph :core + direction TB + :core:analytics[analytics]:::android-library + :core:designsystem[designsystem]:::android-library + :core:model[model]:::jvm + :core:ui[ui]:::android-library + end + + :core:ui ---> :core:analytics + :core:ui ---> :core:designsystem + :core:ui ---> :core:model + +classDef android-application fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-library fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-test fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef jvm fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef unknown fill:#FF0000,stroke:#fff,stroke-width:2px,color:#fff; +``` + diff --git a/feature/bookmarks/README.md b/feature/bookmarks/README.md new file mode 100644 index 000000000..667d1e277 --- /dev/null +++ b/feature/bookmarks/README.md @@ -0,0 +1,58 @@ +# `:feature:bookmarks` + + +```mermaid +--- +config: + layout: elk + elk: + nodePlacementStrategy: SIMPLE +--- +graph TB + subgraph :core + direction TB + :core:analytics[analytics]:::android-library + :core:common[common]:::jvm + :core:data[data]:::android-library + :core:database[database]:::android-library + :core:datastore[datastore]:::android-library + :core:datastore-proto[datastore-proto]:::android-library + :core:designsystem[designsystem]:::android-library + :core:model[model]:::jvm + :core:network[network]:::android-library + :core:notifications[notifications]:::android-library + :core:ui[ui]:::android-library + end + subgraph :feature + direction TB + :feature:bookmarks[bookmarks]:::android-library + end + + :core:data -.-> :core:analytics + :core:data ---> :core:common + :core:data ---> :core:database + :core:data ---> :core:datastore + :core:data ---> :core:network + :core:data -.-> :core:notifications + :core:database ---> :core:model + :core:datastore -.-> :core:common + :core:datastore ---> :core:datastore-proto + :core:datastore ---> :core:model + :core:network ---> :core:common + :core:network ---> :core:model + :core:notifications -.-> :core:common + :core:notifications ---> :core:model + :core:ui ---> :core:analytics + :core:ui ---> :core:designsystem + :core:ui ---> :core:model + :feature:bookmarks -.-> :core:data + :feature:bookmarks -.-> :core:designsystem + :feature:bookmarks -.-> :core:ui + +classDef android-application fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-library fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-test fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef jvm fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef unknown fill:#FF0000,stroke:#fff,stroke-width:2px,color:#fff; +``` + diff --git a/feature/foryou/README.md b/feature/foryou/README.md new file mode 100644 index 000000000..a0846e6af --- /dev/null +++ b/feature/foryou/README.md @@ -0,0 +1,63 @@ +# `:feature:foryou` + + +```mermaid +--- +config: + layout: elk + elk: + nodePlacementStrategy: SIMPLE +--- +graph TB + subgraph :core + direction TB + :core:analytics[analytics]:::android-library + :core:common[common]:::jvm + :core:data[data]:::android-library + :core:database[database]:::android-library + :core:datastore[datastore]:::android-library + :core:datastore-proto[datastore-proto]:::android-library + :core:designsystem[designsystem]:::android-library + :core:domain[domain]:::android-library + :core:model[model]:::jvm + :core:network[network]:::android-library + :core:notifications[notifications]:::android-library + :core:ui[ui]:::android-library + end + subgraph :feature + direction TB + :feature:foryou[foryou]:::android-library + end + + :core:data -.-> :core:analytics + :core:data ---> :core:common + :core:data ---> :core:database + :core:data ---> :core:datastore + :core:data ---> :core:network + :core:data -.-> :core:notifications + :core:database ---> :core:model + :core:datastore -.-> :core:common + :core:datastore ---> :core:datastore-proto + :core:datastore ---> :core:model + :core:domain ---> :core:data + :core:domain ---> :core:model + :core:network ---> :core:common + :core:network ---> :core:model + :core:notifications -.-> :core:common + :core:notifications ---> :core:model + :core:ui ---> :core:analytics + :core:ui ---> :core:designsystem + :core:ui ---> :core:model + :feature:foryou -.-> :core:data + :feature:foryou -.-> :core:designsystem + :feature:foryou -.-> :core:domain + :feature:foryou -.-> :core:notifications + :feature:foryou -.-> :core:ui + +classDef android-application fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-library fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-test fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef jvm fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef unknown fill:#FF0000,stroke:#fff,stroke-width:2px,color:#fff; +``` + diff --git a/feature/interests/README.md b/feature/interests/README.md new file mode 100644 index 000000000..143ce58bb --- /dev/null +++ b/feature/interests/README.md @@ -0,0 +1,62 @@ +# `:feature:interests` + + +```mermaid +--- +config: + layout: elk + elk: + nodePlacementStrategy: SIMPLE +--- +graph TB + subgraph :core + direction TB + :core:analytics[analytics]:::android-library + :core:common[common]:::jvm + :core:data[data]:::android-library + :core:database[database]:::android-library + :core:datastore[datastore]:::android-library + :core:datastore-proto[datastore-proto]:::android-library + :core:designsystem[designsystem]:::android-library + :core:domain[domain]:::android-library + :core:model[model]:::jvm + :core:network[network]:::android-library + :core:notifications[notifications]:::android-library + :core:ui[ui]:::android-library + end + subgraph :feature + direction TB + :feature:interests[interests]:::android-library + end + + :core:data -.-> :core:analytics + :core:data ---> :core:common + :core:data ---> :core:database + :core:data ---> :core:datastore + :core:data ---> :core:network + :core:data -.-> :core:notifications + :core:database ---> :core:model + :core:datastore -.-> :core:common + :core:datastore ---> :core:datastore-proto + :core:datastore ---> :core:model + :core:domain ---> :core:data + :core:domain ---> :core:model + :core:network ---> :core:common + :core:network ---> :core:model + :core:notifications -.-> :core:common + :core:notifications ---> :core:model + :core:ui ---> :core:analytics + :core:ui ---> :core:designsystem + :core:ui ---> :core:model + :feature:interests -.-> :core:data + :feature:interests -.-> :core:designsystem + :feature:interests -.-> :core:domain + :feature:interests -.-> :core:ui + +classDef android-application fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-library fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-test fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef jvm fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef unknown fill:#FF0000,stroke:#fff,stroke-width:2px,color:#fff; +``` + diff --git a/feature/search/README.md b/feature/search/README.md new file mode 100644 index 000000000..9deedad41 --- /dev/null +++ b/feature/search/README.md @@ -0,0 +1,62 @@ +# `:feature:search` + + +```mermaid +--- +config: + layout: elk + elk: + nodePlacementStrategy: SIMPLE +--- +graph TB + subgraph :core + direction TB + :core:analytics[analytics]:::android-library + :core:common[common]:::jvm + :core:data[data]:::android-library + :core:database[database]:::android-library + :core:datastore[datastore]:::android-library + :core:datastore-proto[datastore-proto]:::android-library + :core:designsystem[designsystem]:::android-library + :core:domain[domain]:::android-library + :core:model[model]:::jvm + :core:network[network]:::android-library + :core:notifications[notifications]:::android-library + :core:ui[ui]:::android-library + end + subgraph :feature + direction TB + :feature:search[search]:::android-library + end + + :core:data -.-> :core:analytics + :core:data ---> :core:common + :core:data ---> :core:database + :core:data ---> :core:datastore + :core:data ---> :core:network + :core:data -.-> :core:notifications + :core:database ---> :core:model + :core:datastore -.-> :core:common + :core:datastore ---> :core:datastore-proto + :core:datastore ---> :core:model + :core:domain ---> :core:data + :core:domain ---> :core:model + :core:network ---> :core:common + :core:network ---> :core:model + :core:notifications -.-> :core:common + :core:notifications ---> :core:model + :core:ui ---> :core:analytics + :core:ui ---> :core:designsystem + :core:ui ---> :core:model + :feature:search -.-> :core:data + :feature:search -.-> :core:designsystem + :feature:search -.-> :core:domain + :feature:search -.-> :core:ui + +classDef android-application fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-library fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-test fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef jvm fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef unknown fill:#FF0000,stroke:#fff,stroke-width:2px,color:#fff; +``` + diff --git a/feature/settings/README.md b/feature/settings/README.md new file mode 100644 index 000000000..c0c78931b --- /dev/null +++ b/feature/settings/README.md @@ -0,0 +1,58 @@ +# `:feature:settings` + + +```mermaid +--- +config: + layout: elk + elk: + nodePlacementStrategy: SIMPLE +--- +graph TB + subgraph :core + direction TB + :core:analytics[analytics]:::android-library + :core:common[common]:::jvm + :core:data[data]:::android-library + :core:database[database]:::android-library + :core:datastore[datastore]:::android-library + :core:datastore-proto[datastore-proto]:::android-library + :core:designsystem[designsystem]:::android-library + :core:model[model]:::jvm + :core:network[network]:::android-library + :core:notifications[notifications]:::android-library + :core:ui[ui]:::android-library + end + subgraph :feature + direction TB + :feature:settings[settings]:::android-library + end + + :core:data -.-> :core:analytics + :core:data ---> :core:common + :core:data ---> :core:database + :core:data ---> :core:datastore + :core:data ---> :core:network + :core:data -.-> :core:notifications + :core:database ---> :core:model + :core:datastore -.-> :core:common + :core:datastore ---> :core:datastore-proto + :core:datastore ---> :core:model + :core:network ---> :core:common + :core:network ---> :core:model + :core:notifications -.-> :core:common + :core:notifications ---> :core:model + :core:ui ---> :core:analytics + :core:ui ---> :core:designsystem + :core:ui ---> :core:model + :feature:settings -.-> :core:data + :feature:settings -.-> :core:designsystem + :feature:settings -.-> :core:ui + +classDef android-application fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-library fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-test fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef jvm fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef unknown fill:#FF0000,stroke:#fff,stroke-width:2px,color:#fff; +``` + diff --git a/feature/topic/README.md b/feature/topic/README.md new file mode 100644 index 000000000..e10b7b4a1 --- /dev/null +++ b/feature/topic/README.md @@ -0,0 +1,58 @@ +# `:feature:topic` + + +```mermaid +--- +config: + layout: elk + elk: + nodePlacementStrategy: SIMPLE +--- +graph TB + subgraph :core + direction TB + :core:analytics[analytics]:::android-library + :core:common[common]:::jvm + :core:data[data]:::android-library + :core:database[database]:::android-library + :core:datastore[datastore]:::android-library + :core:datastore-proto[datastore-proto]:::android-library + :core:designsystem[designsystem]:::android-library + :core:model[model]:::jvm + :core:network[network]:::android-library + :core:notifications[notifications]:::android-library + :core:ui[ui]:::android-library + end + subgraph :feature + direction TB + :feature:topic[topic]:::android-library + end + + :core:data -.-> :core:analytics + :core:data ---> :core:common + :core:data ---> :core:database + :core:data ---> :core:datastore + :core:data ---> :core:network + :core:data -.-> :core:notifications + :core:database ---> :core:model + :core:datastore -.-> :core:common + :core:datastore ---> :core:datastore-proto + :core:datastore ---> :core:model + :core:network ---> :core:common + :core:network ---> :core:model + :core:notifications -.-> :core:common + :core:notifications ---> :core:model + :core:ui ---> :core:analytics + :core:ui ---> :core:designsystem + :core:ui ---> :core:model + :feature:topic -.-> :core:data + :feature:topic -.-> :core:designsystem + :feature:topic -.-> :core:ui + +classDef android-application fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-library fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-test fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef jvm fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef unknown fill:#FF0000,stroke:#fff,stroke-width:2px,color:#fff; +``` + diff --git a/sync/sync-test/README.md b/sync/sync-test/README.md new file mode 100644 index 000000000..29da495ae --- /dev/null +++ b/sync/sync-test/README.md @@ -0,0 +1,56 @@ +# `:sync:sync-test` + + +```mermaid +--- +config: + layout: elk + elk: + nodePlacementStrategy: SIMPLE +--- +graph TB + subgraph :core + direction TB + :core:analytics[analytics]:::android-library + :core:common[common]:::jvm + :core:data[data]:::android-library + :core:database[database]:::android-library + :core:datastore[datastore]:::android-library + :core:datastore-proto[datastore-proto]:::android-library + :core:model[model]:::jvm + :core:network[network]:::android-library + :core:notifications[notifications]:::android-library + end + subgraph :sync + direction TB + :sync:sync-test[sync-test]:::android-library + :sync:work[work]:::android-library + end + + :core:data -.-> :core:analytics + :core:data ---> :core:common + :core:data ---> :core:database + :core:data ---> :core:datastore + :core:data ---> :core:network + :core:data -.-> :core:notifications + :core:database ---> :core:model + :core:datastore -.-> :core:common + :core:datastore ---> :core:datastore-proto + :core:datastore ---> :core:model + :core:network ---> :core:common + :core:network ---> :core:model + :core:notifications -.-> :core:common + :core:notifications ---> :core:model + :sync:sync-test -.-> :core:data + :sync:sync-test -.-> :sync:work + :sync:work -.-> :core:analytics + :sync:work -.-> :core:data + :sync:work -.-> :core:notifications + +classDef android-application fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-library fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-test fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef jvm fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef unknown fill:#FF0000,stroke:#fff,stroke-width:2px,color:#fff; +``` + diff --git a/sync/work/README.md b/sync/work/README.md new file mode 100644 index 000000000..246742bbb --- /dev/null +++ b/sync/work/README.md @@ -0,0 +1,53 @@ +# `:sync:work` + + +```mermaid +--- +config: + layout: elk + elk: + nodePlacementStrategy: SIMPLE +--- +graph TB + subgraph :core + direction TB + :core:analytics[analytics]:::android-library + :core:common[common]:::jvm + :core:data[data]:::android-library + :core:database[database]:::android-library + :core:datastore[datastore]:::android-library + :core:datastore-proto[datastore-proto]:::android-library + :core:model[model]:::jvm + :core:network[network]:::android-library + :core:notifications[notifications]:::android-library + end + subgraph :sync + direction TB + :sync:work[work]:::android-library + end + + :core:data -.-> :core:analytics + :core:data ---> :core:common + :core:data ---> :core:database + :core:data ---> :core:datastore + :core:data ---> :core:network + :core:data -.-> :core:notifications + :core:database ---> :core:model + :core:datastore -.-> :core:common + :core:datastore ---> :core:datastore-proto + :core:datastore ---> :core:model + :core:network ---> :core:common + :core:network ---> :core:model + :core:notifications -.-> :core:common + :core:notifications ---> :core:model + :sync:work -.-> :core:analytics + :sync:work -.-> :core:data + :sync:work -.-> :core:notifications + +classDef android-application fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-library fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-test fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef jvm fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef unknown fill:#FF0000,stroke:#fff,stroke-width:2px,color:#fff; +``` + diff --git a/ui-test-hilt-manifest/README.md b/ui-test-hilt-manifest/README.md new file mode 100644 index 000000000..92f93ca64 --- /dev/null +++ b/ui-test-hilt-manifest/README.md @@ -0,0 +1,20 @@ +# `:ui-test-hilt-manifest` + + +```mermaid +--- +config: + layout: elk + elk: + nodePlacementStrategy: SIMPLE +--- +graph TB + :ui-test-hilt-manifest[ui-test-hilt-manifest]:::android-library + +classDef android-application fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-library fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef android-test fill:#3BD482,stroke:#fff,stroke-width:2px,color:#fff; +classDef jvm fill:#7F52FF,stroke:#fff,stroke-width:2px,color:#fff; +classDef unknown fill:#FF0000,stroke:#fff,stroke-width:2px,color:#fff; +``` + From 5e34fb49c04717265d5351035fcc87f6bba6ed18 Mon Sep 17 00:00:00 2001 From: Simon Marquis Date: Wed, 3 Sep 2025 22:15:26 +0200 Subject: [PATCH 5/6] Create `RootPlugin` to `configureGraphTasks()` on `subprojects` --- build-logic/convention/build.gradle.kts | 4 +++ .../AndroidApplicationConventionPlugin.kt | 2 -- .../kotlin/AndroidLibraryConventionPlugin.kt | 2 -- .../kotlin/AndroidTestConventionPlugin.kt | 2 -- .../main/kotlin/JvmLibraryConventionPlugin.kt | 2 -- .../convention/src/main/kotlin/RootPlugin.kt | 26 +++++++++++++++++++ .../google/samples/apps/nowinandroid/Graph.kt | 2 +- build.gradle.kts | 1 + gradle/libs.versions.toml | 1 + 9 files changed, 33 insertions(+), 9 deletions(-) create mode 100644 build-logic/convention/src/main/kotlin/RootPlugin.kt diff --git a/build-logic/convention/build.gradle.kts b/build-logic/convention/build.gradle.kts index 958ae82f5..166b54907 100644 --- a/build-logic/convention/build.gradle.kts +++ b/build-logic/convention/build.gradle.kts @@ -114,5 +114,9 @@ gradlePlugin { id = libs.plugins.nowinandroid.jvm.library.get().pluginId implementationClass = "JvmLibraryConventionPlugin" } + register("root") { + id = libs.plugins.nowinandroid.root.get().pluginId + implementationClass = "RootPlugin" + } } } diff --git a/build-logic/convention/src/main/kotlin/AndroidApplicationConventionPlugin.kt b/build-logic/convention/src/main/kotlin/AndroidApplicationConventionPlugin.kt index 4fa7a7afa..f45d664b7 100644 --- a/build-logic/convention/src/main/kotlin/AndroidApplicationConventionPlugin.kt +++ b/build-logic/convention/src/main/kotlin/AndroidApplicationConventionPlugin.kt @@ -18,7 +18,6 @@ import com.android.build.api.dsl.ApplicationExtension import com.android.build.api.variant.ApplicationAndroidComponentsExtension import com.google.samples.apps.nowinandroid.configureBadgingTasks import com.google.samples.apps.nowinandroid.configureGradleManagedDevices -import com.google.samples.apps.nowinandroid.configureGraphTasks import com.google.samples.apps.nowinandroid.configureKotlinAndroid import com.google.samples.apps.nowinandroid.configurePrintApksTask import org.gradle.api.Plugin @@ -46,7 +45,6 @@ class AndroidApplicationConventionPlugin : Plugin { configurePrintApksTask(this) configureBadgingTasks(extensions.getByType(), this) } - configureGraphTasks() } } } diff --git a/build-logic/convention/src/main/kotlin/AndroidLibraryConventionPlugin.kt b/build-logic/convention/src/main/kotlin/AndroidLibraryConventionPlugin.kt index c4f464101..0f6fde884 100644 --- a/build-logic/convention/src/main/kotlin/AndroidLibraryConventionPlugin.kt +++ b/build-logic/convention/src/main/kotlin/AndroidLibraryConventionPlugin.kt @@ -18,7 +18,6 @@ import com.android.build.api.dsl.LibraryExtension import com.android.build.api.variant.LibraryAndroidComponentsExtension import com.google.samples.apps.nowinandroid.configureFlavors import com.google.samples.apps.nowinandroid.configureGradleManagedDevices -import com.google.samples.apps.nowinandroid.configureGraphTasks import com.google.samples.apps.nowinandroid.configureKotlinAndroid import com.google.samples.apps.nowinandroid.configurePrintApksTask import com.google.samples.apps.nowinandroid.disableUnnecessaryAndroidTests @@ -60,7 +59,6 @@ class AndroidLibraryConventionPlugin : Plugin { "implementation"(libs.findLibrary("androidx.tracing.ktx").get()) } - configureGraphTasks() } } } diff --git a/build-logic/convention/src/main/kotlin/AndroidTestConventionPlugin.kt b/build-logic/convention/src/main/kotlin/AndroidTestConventionPlugin.kt index 9221cbf08..49c2eecec 100644 --- a/build-logic/convention/src/main/kotlin/AndroidTestConventionPlugin.kt +++ b/build-logic/convention/src/main/kotlin/AndroidTestConventionPlugin.kt @@ -16,7 +16,6 @@ import com.android.build.api.dsl.TestExtension import com.google.samples.apps.nowinandroid.configureGradleManagedDevices -import com.google.samples.apps.nowinandroid.configureGraphTasks import com.google.samples.apps.nowinandroid.configureKotlinAndroid import org.gradle.api.Plugin import org.gradle.api.Project @@ -34,7 +33,6 @@ class AndroidTestConventionPlugin : Plugin { defaultConfig.targetSdk = 35 configureGradleManagedDevices(this) } - configureGraphTasks() } } } diff --git a/build-logic/convention/src/main/kotlin/JvmLibraryConventionPlugin.kt b/build-logic/convention/src/main/kotlin/JvmLibraryConventionPlugin.kt index 2866de1a2..a1477891d 100644 --- a/build-logic/convention/src/main/kotlin/JvmLibraryConventionPlugin.kt +++ b/build-logic/convention/src/main/kotlin/JvmLibraryConventionPlugin.kt @@ -14,7 +14,6 @@ * limitations under the License. */ -import com.google.samples.apps.nowinandroid.configureGraphTasks import com.google.samples.apps.nowinandroid.configureKotlinJvm import com.google.samples.apps.nowinandroid.libs import org.gradle.api.Plugin @@ -32,7 +31,6 @@ class JvmLibraryConventionPlugin : Plugin { dependencies { "testImplementation"(libs.findLibrary("kotlin.test").get()) } - configureGraphTasks() } } } diff --git a/build-logic/convention/src/main/kotlin/RootPlugin.kt b/build-logic/convention/src/main/kotlin/RootPlugin.kt new file mode 100644 index 000000000..b704adf76 --- /dev/null +++ b/build-logic/convention/src/main/kotlin/RootPlugin.kt @@ -0,0 +1,26 @@ +/* + * Copyright 2025 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import com.google.samples.apps.nowinandroid.configureGraphTasks +import org.gradle.api.Plugin +import org.gradle.api.Project + +class RootPlugin : Plugin { + override fun apply(target: Project) { + require(target.path == ":") + target.subprojects { configureGraphTasks() } + } +} diff --git a/build-logic/convention/src/main/kotlin/com/google/samples/apps/nowinandroid/Graph.kt b/build-logic/convention/src/main/kotlin/com/google/samples/apps/nowinandroid/Graph.kt index 41c39c453..c9a71dde2 100644 --- a/build-logic/convention/src/main/kotlin/com/google/samples/apps/nowinandroid/Graph.kt +++ b/build-logic/convention/src/main/kotlin/com/google/samples/apps/nowinandroid/Graph.kt @@ -120,7 +120,7 @@ internal enum class PluginType(val id: String, val ref: String, val style: Strin ), } -fun Project.configureGraphTasks() { +internal fun Project.configureGraphTasks() { val dumpTask = tasks.register("graphDump") { val graph = Graph(this@configureGraphTasks).invoke() projectPath = this@configureGraphTasks.path diff --git a/build.gradle.kts b/build.gradle.kts index 0981b8920..594f7f92e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -38,4 +38,5 @@ plugins { alias(libs.plugins.roborazzi) apply false alias(libs.plugins.google.osslicenses) apply false alias(libs.plugins.room) apply false + alias(libs.plugins.nowinandroid.root) } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 6f75a2aca..22692120d 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -194,3 +194,4 @@ nowinandroid-android-room = { id = "nowinandroid.android.room" } nowinandroid-android-test = { id = "nowinandroid.android.test" } nowinandroid-hilt = { id = "nowinandroid.hilt" } nowinandroid-jvm-library = { id = "nowinandroid.jvm.library" } +nowinandroid-root = { id = "nowinandroid.root" } From 175164f76f3a48d2cb758cd1a1cbafdc572253bd Mon Sep 17 00:00:00 2001 From: Simon Marquis Date: Wed, 3 Sep 2025 22:51:13 +0200 Subject: [PATCH 6/6] Detect changes when rendering graphs and auto-commit --- .github/workflows/Build.yaml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/.github/workflows/Build.yaml b/.github/workflows/Build.yaml index a4a49b8ee..1e67aefbb 100644 --- a/.github/workflows/Build.yaml +++ b/.github/workflows/Build.yaml @@ -77,6 +77,35 @@ jobs: disable_globbing: true commit_message: "🤖 Updates baselines for Dependency Guard" + - name: Update Graphs + run: ./gradlew updateGraph + + - name: Check Graphs + id: graphs_verify + run: git add -- '**/README.md' && git diff --cached --quiet --exit-code -- '**/README.md' + + - name: Prevent updating graphs if this is a fork + id: checkfork_graphs + continue-on-error: false + if: steps.graphs_verify.outcome == 'failure' && github.event.pull_request.head.repo.full_name != github.repository + run: | + echo "::error::Check Graphs failed, please update graphs with: ./gradlew updateGraph" && exit 1 + + # Runs if previous job failed + - name: Generate new Dependency Guard baselines if verification failed and it's a PR + id: dependencyguard_baseline + if: steps.dependencyguard_verify.outcome == 'failure' && github.event_name == 'pull_request' + run: | + ./gradlew dependencyGuardBaseline + + - name: Push new graphs if available + if: steps.graphs_verify.outcome == 'failure' && github.event_name == 'pull_request' + uses: stefanzweifel/git-auto-commit-action@v5 + with: + file_pattern: '**/README.md' + disable_globbing: true + commit_message: "🤖 Updates graphs" + - name: Run all local screenshot tests (Roborazzi) id: screenshotsverify continue-on-error: true