-
-
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
How to use this to generate a Module dependency graph? #71
Comments
I also want this. Started with it here - https://github.com/vanniktech/gradle-dependency-graph-generator-plugin/tree/projectdotgenerator - but didn't get that far. I don't think you can use the Generator API to achieve this. I tried this but could not get it to work. Also, I'm not sure how to model the new API. Let me know what you'd want. |
I basically just want a way to show the iOS team the way we've modularised our code base so that we can align ourselves, the output of this plugin would have been perfect had I been able to show modules only. I haven't got much experience with gradle so I'm probably not going to be much help, that being said if I find some time I may take a look and see if I can figure something out. |
Getting closer. Hopefully, I have something by the end of this week. |
Take a look at the projectDependencyGraph task which generates a dependency tree of all Gradle modules in a project. You need the |
Yeah my solution is based on the one from Jake. |
I had similar issue, I was able to achieve by simply checking the name of the dependency. So I have updated code from example to following and it works just fine: def firebaseGenerator = new Generator(
"allModules", // Suffix for our Gradle task.
// ! THE CHANGE IS HERE !
{ dependency -> dependency.getName().startsWith("main_android") }, // Only want Firebase.
{ dependency -> true }, // Include transitive dependencies.
{ node, dependency -> node.add(Style.FILLED, Color.rgb("#ffcb2b")) }, // Give them some color.
)
It works because when you print the names of all dependencies they are as following:
|
This is more of a question than an issue.
I have a multi module project and I'd like to generate a graph of the dependencies between modules only. I've created my own Generator and I'm trying to filter the dependencies and the dependencies of those dependencies but I'm not getting the desired result.
It correctly generates a graph with my main module at the top and each of the other library modules connected to it, but some of these library modules depend on each other which isn't being displayed in the graph.
It seems like
dependency.getChildren()
can only see dependencies marked as "api" and not "implementation" which my modules are,implementation project(':network-provider')
for example.Any ideas?
The text was updated successfully, but these errors were encountered: