-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
Support generateProjectDependencyGraph in SubProject #134
Support generateProjectDependencyGraph in SubProject #134
Conversation
#125 will be achieved by this merge request as well. |
@tedliang can you show an before and after image of your repository? |
e54e844
to
b3c4157
Compare
@tedliang thanks! Do you mind adding a test for this new behavior? Then we can merge |
@@ -213,7 +216,7 @@ class DependencyGraphGeneratorPluginTest { | |||
.withPluginClasspath() | |||
.withGradleVersion("5.0") | |||
.withProjectDir(testProjectDir.root) | |||
.withArguments("generateDependencyGraph", "generateProjectDependencyGraph") | |||
.withArguments("generateDependencyGraph", "generateProjectDependencyGraph", "app:generateProjectDependencyGraph") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will trigger the task to generate project dependency graph on sub project app
.
// We don't want to assert the content of the image, just that it exists. | ||
assertThat(File(testProjectDir.root, "app/build/reports/project-dependency-graph/project-dependency-graph.svg")).exists() | ||
|
||
assertThat(File(testProjectDir.root, "app/build/reports/project-dependency-graph/project-dependency-graph.dot")).hasContent(projectDependencyGraph("app")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will make sure the graph generated from sub project app
is correct. If you rollback the implementation code, this test will be failed, as the original code didn't include the nested dependencies.
@tedliang thank you very much. If you want to continue working on this project - I have very little time to do PRs - please do! |
In monorepo, generateProjectDependencyGraph from individual sub project would be more practical.
eg.
./gradlew app:generateProjectDependencyGraph