Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add project dependency graph visualization #1834

Merged
merged 4 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ Keep the following things in mind when working on a PR:
- For that reason, `MaestroCommand` class should be JSON-serializable (and is a reason we haven't moved to `sealed class`)
- We do not use mocks. Use fakes instead (e.g. `FakeDriver`).

This graph (generated with [`./gradlew :generateDependencyGraph`][graph_plugin]) may be helpful
to visualize relations between subprojects:

![Project dependency graph](assets/project-dependency-graph.svg)

## How to

### Add new command
Expand All @@ -101,3 +106,5 @@ Follow these steps:
- Handle command in `Orchestra` class.
- If this is a new functionality, you might need to add new methods to `Maestro` and `Driver` APIs.
- Add a new test to `IntegrationTest`.

[graph_plugin]: https://github.com/vanniktech/gradle-dependency-graph-generator-plugin
217 changes: 217 additions & 0 deletions assets/project-dependency-graph.svg
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do we plan to use this graph? It would be useful if we capture it in PR description

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can run it in PR and append it as image in Markdown to GitHub Job Output

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ plugins {
alias(libs.plugins.google.protobuf) apply false
alias(libs.plugins.vanniktech.publish)
alias(libs.plugins.detekt)
alias(libs.plugins.vanniktech.graphGenerator)
}

java {
Expand All @@ -17,4 +18,4 @@ detekt {
allRules = false
autoCorrect = true
config = files("${rootDir}/detekt.yml")
}
}
1 change: 1 addition & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,4 @@ detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }
google-protobuf = { id = "com.google.protobuf", version.ref = "googleProtobufPlugin" }
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
vanniktech-publish = { id = "com.vanniktech.maven.publish", version = "0.19.0" }
vanniktech-graphGenerator = { id = "com.vanniktech.dependency.graph.generator", version = "0.8.0" }