Merge 175164f76f
into e846078f9d
@ -1,3 +1,33 @@
|
|||||||
# :app-nia-catalog module
|
# `:app-nia-catalog`
|
||||||
## Dependency graph
|
|
||||||

|
<!--region graph-->
|
||||||
|
```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;
|
||||||
|
```
|
||||||
|
<!--endregion-->
|
||||||
|
@ -1,3 +1,109 @@
|
|||||||
# :app module
|
# `:app`
|
||||||
## Dependency graph
|
|
||||||

|
<!--region graph-->
|
||||||
|
```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;
|
||||||
|
```
|
||||||
|
<!--endregion-->
|
||||||
|
@ -0,0 +1,109 @@
|
|||||||
|
# `:benchmarks`
|
||||||
|
|
||||||
|
<!--region graph-->
|
||||||
|
```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;
|
||||||
|
```
|
||||||
|
<!--endregion-->
|
@ -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<Project> {
|
||||||
|
override fun apply(target: Project) {
|
||||||
|
require(target.path == ":")
|
||||||
|
target.subprojects { configureGraphTasks() }
|
||||||
|
}
|
||||||
|
}
|
@ -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<Project, Set<Pair<Configuration, Project>>> = mutableMapOf(),
|
||||||
|
private val plugins: MutableMap<Project, PluginType> = mutableMapOf(),
|
||||||
|
private val seen: MutableSet<String> = 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<ProjectDependency>().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<String, Set<Pair<String, String>>> = 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",
|
||||||
|
),
|
||||||
|
}
|
||||||
|
|
||||||
|
internal fun Project.configureGraphTasks() {
|
||||||
|
val dumpTask = tasks.register<GraphDumpTask>("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<GraphUpdateTask>("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<String>
|
||||||
|
|
||||||
|
@get:Input
|
||||||
|
abstract val dependencies: MapProperty<String, Set<Pair<String, String>>>
|
||||||
|
|
||||||
|
@get:Input
|
||||||
|
abstract val plugins: MapProperty<String, PluginType>
|
||||||
|
|
||||||
|
@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<Dependency> = 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<String, String>.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<String>
|
||||||
|
|
||||||
|
@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()}`
|
||||||
|
|
||||||
|
<!--region graph--> <!--endregion-->
|
||||||
|
|
||||||
|
""".trimIndent(),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
val regex = """(<!--region graph-->)(.*?)(<!--endregion-->)""".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())
|
||||||
|
}
|
@ -1,3 +1,23 @@
|
|||||||
# :core:analytics module
|
# `:core:analytics`
|
||||||
## Dependency graph
|
|
||||||

|
<!--region graph-->
|
||||||
|
```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;
|
||||||
|
```
|
||||||
|
<!--endregion-->
|
||||||
|
@ -1,3 +1,23 @@
|
|||||||
# :core:common module
|
# `:core:common`
|
||||||
## Dependency graph
|
|
||||||

|
<!--region graph-->
|
||||||
|
```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;
|
||||||
|
```
|
||||||
|
<!--endregion-->
|
||||||
|
@ -1,3 +1,48 @@
|
|||||||
# :core:data-test module
|
# `:core:data-test`
|
||||||
## Dependency graph
|
|
||||||

|
<!--region graph-->
|
||||||
|
```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;
|
||||||
|
```
|
||||||
|
<!--endregion-->
|
||||||
|
@ -1,3 +1,46 @@
|
|||||||
# :core:data module
|
# `:core:data`
|
||||||
## Dependency graph
|
|
||||||

|
<!--region graph-->
|
||||||
|
```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;
|
||||||
|
```
|
||||||
|
<!--endregion-->
|
||||||
|
@ -1,3 +1,26 @@
|
|||||||
# :core:database module
|
# `:core:database`
|
||||||
## Dependency graph
|
|
||||||

|
<!--region graph-->
|
||||||
|
```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;
|
||||||
|
```
|
||||||
|
<!--endregion-->
|
||||||
|
@ -1,3 +1,23 @@
|
|||||||
# :core:datastore-proto module
|
# `:core:datastore-proto`
|
||||||
## Dependency graph
|
|
||||||

|
<!--region graph-->
|
||||||
|
```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;
|
||||||
|
```
|
||||||
|
<!--endregion-->
|
||||||
|
@ -1,3 +1,33 @@
|
|||||||
# :core:datastore-test module
|
# `:core:datastore-test`
|
||||||
## Dependency graph
|
|
||||||

|
<!--region graph-->
|
||||||
|
```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;
|
||||||
|
```
|
||||||
|
<!--endregion-->
|
||||||
|
@ -1,3 +1,30 @@
|
|||||||
# :core:datastore module
|
# `:core:datastore`
|
||||||
## Dependency graph
|
|
||||||

|
<!--region graph-->
|
||||||
|
```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;
|
||||||
|
```
|
||||||
|
<!--endregion-->
|
||||||
|
@ -1,3 +1,23 @@
|
|||||||
# :core:designsystem module
|
# `:core:designsystem`
|
||||||
## Dependency graph
|
|
||||||

|
<!--region graph-->
|
||||||
|
```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;
|
||||||
|
```
|
||||||
|
<!--endregion-->
|
||||||
|
@ -1,3 +1,49 @@
|
|||||||
# :core:domain module
|
# `:core:domain`
|
||||||
## Dependency graph
|
|
||||||

|
<!--region graph-->
|
||||||
|
```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;
|
||||||
|
```
|
||||||
|
<!--endregion-->
|
||||||
|
@ -1,3 +1,23 @@
|
|||||||
# :core:model module
|
# `:core:model`
|
||||||
## Dependency graph
|
|
||||||

|
<!--region graph-->
|
||||||
|
```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;
|
||||||
|
```
|
||||||
|
<!--endregion-->
|
||||||
|
@ -1,3 +1,28 @@
|
|||||||
# :core:network module
|
# `:core:network`
|
||||||
## Dependency graph
|
|
||||||

|
<!--region graph-->
|
||||||
|
```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;
|
||||||
|
```
|
||||||
|
<!--endregion-->
|
||||||
|
@ -1,3 +1,28 @@
|
|||||||
# :core:notifications module
|
# `:core:notifications`
|
||||||
## Dependency graph
|
|
||||||

|
<!--region graph-->
|
||||||
|
```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;
|
||||||
|
```
|
||||||
|
<!--endregion-->
|
||||||
|
@ -1,3 +1,26 @@
|
|||||||
# :core:screenshot-testing module
|
# `:core:screenshot-testing`
|
||||||
## Dependency graph
|
|
||||||

|
<!--region graph-->
|
||||||
|
```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;
|
||||||
|
```
|
||||||
|
<!--endregion-->
|
||||||
|
@ -1,3 +1,52 @@
|
|||||||
# :core:testing module
|
# `:core:testing`
|
||||||
## Dependency graph
|
|
||||||

|
<!--region graph-->
|
||||||
|
```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;
|
||||||
|
```
|
||||||
|
<!--endregion-->
|
||||||
|
@ -1,3 +1,30 @@
|
|||||||
# :core:ui module
|
# `:core:ui`
|
||||||
## Dependency graph
|
|
||||||

|
<!--region graph-->
|
||||||
|
```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;
|
||||||
|
```
|
||||||
|
<!--endregion-->
|
||||||
|
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 459 B |
Before Width: | Height: | Size: 456 B |
Before Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 6.0 KiB |
Before Width: | Height: | Size: 920 B |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 465 B |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 462 B |
Before Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 455 B |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 944 B |
Before Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 7.5 KiB |
Before Width: | Height: | Size: 8.5 KiB |
Before Width: | Height: | Size: 8.5 KiB |
Before Width: | Height: | Size: 8.5 KiB |
Before Width: | Height: | Size: 7.5 KiB |
Before Width: | Height: | Size: 7.5 KiB |
Before Width: | Height: | Size: 6.9 KiB |
Before Width: | Height: | Size: 6.2 KiB |
@ -1,3 +1,58 @@
|
|||||||
# :feature:bookmarks module
|
# `:feature:bookmarks`
|
||||||
## Dependency graph
|
|
||||||

|
<!--region graph-->
|
||||||
|
```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;
|
||||||
|
```
|
||||||
|
<!--endregion-->
|
||||||
|
@ -1,3 +1,63 @@
|
|||||||
# :feature:foryou module
|
# `:feature:foryou`
|
||||||
## Dependency graph
|
|
||||||

|
<!--region graph-->
|
||||||
|
```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;
|
||||||
|
```
|
||||||
|
<!--endregion-->
|
||||||
|
@ -1,3 +1,62 @@
|
|||||||
# :feature:interests module
|
# `:feature:interests`
|
||||||
## Dependency graph
|
|
||||||

|
<!--region graph-->
|
||||||
|
```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;
|
||||||
|
```
|
||||||
|
<!--endregion-->
|
||||||
|
@ -1,3 +1,62 @@
|
|||||||
# :feature:search module
|
# `:feature:search`
|
||||||
## Dependency graph
|
|
||||||

|
<!--region graph-->
|
||||||
|
```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;
|
||||||
|
```
|
||||||
|
<!--endregion-->
|
||||||
|
@ -1,3 +1,58 @@
|
|||||||
# :feature:settings module
|
# `:feature:settings`
|
||||||
## Dependency graph
|
|
||||||

|
<!--region graph-->
|
||||||
|
```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;
|
||||||
|
```
|
||||||
|
<!--endregion-->
|
||||||
|
@ -1,3 +1,58 @@
|
|||||||
# :feature:topic module
|
# `:feature:topic`
|
||||||
## Dependency graph
|
|
||||||

|
<!--region graph-->
|
||||||
|
```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;
|
||||||
|
```
|
||||||
|
<!--endregion-->
|
||||||
|
@ -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 "" >> "$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
|
|
||||||
# </dev/null is used to stop ./gradlew from consuming input which prematurely ends the while loop
|
|
||||||
./gradlew generateModulesGraphvizText \
|
|
||||||
-Pmodules.graph.output.gv="/tmp/${file_name}.gv" \
|
|
||||||
-Pmodules.graph.of.module="${module_path}" </dev/null
|
|
||||||
|
|
||||||
# Convert to SVG using dot, and cleanup/compress using svgo
|
|
||||||
dot -Tsvg "/tmp/${file_name}.gv" |
|
|
||||||
svgo --multipass --pretty --output="docs/images/graphs/${file_name}.svg" -
|
|
||||||
# Remove the temporary .gv file
|
|
||||||
rm "/tmp/${file_name}.gv"
|
|
||||||
fi
|
|
||||||
done
|
|
@ -1,3 +1,56 @@
|
|||||||
# :sync:sync-test module
|
# `:sync:sync-test`
|
||||||
## Dependency graph
|
|
||||||

|
<!--region graph-->
|
||||||
|
```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;
|
||||||
|
```
|
||||||
|
<!--endregion-->
|
||||||
|
@ -1,3 +1,53 @@
|
|||||||
# :sync:work module
|
# `:sync:work`
|
||||||
## Dependency graph
|
|
||||||

|
<!--region graph-->
|
||||||
|
```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;
|
||||||
|
```
|
||||||
|
<!--endregion-->
|
||||||
|
@ -0,0 +1,20 @@
|
|||||||
|
# `:ui-test-hilt-manifest`
|
||||||
|
|
||||||
|
<!--region graph-->
|
||||||
|
```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;
|
||||||
|
```
|
||||||
|
<!--endregion-->
|