iurysza / module-graph

A Gradle Plugin for visualizing your project's structure, powered by mermaidjs
https://plugins.gradle.org/plugin/dev.iurysouza.modulegraph
MIT License
345 stars 13 forks source link

Add setting `linkText` to optionally attach the name of the configuration #12

Closed henrikje closed 1 year ago

henrikje commented 1 year ago

🚀 Description

Add setting linkText to optionally attach the name of the configuration to the link in the graph.

The default value for linkText is NONE (current behavior), and value CONFIGURATION will add the configuration name.

📄 Motivation and Context

This is useful when projects become more complex and not all intra-project dependencies are of type "implementation". This includes use of standard non-implementation configurations (e.g. compileOnly, runtimeOnly) and in Kotlin Multiplatform projects (e.g. commonMain, jvmMain, jsMain).

🧪 How Has This Been Tested?

Added unit test to verify behavior. Also tested manually locally.

📦 Types of changes

✅ Checklist

Other

Feel free to make any changes you feel appropriate. :-) Not sure if the name "linkText" is the best name for the configuration property, for example.

iurysza commented 1 year ago

Hey @henrikje, the PR looks great! The linter found just a minor issue there. Can take a look at that? I can't push the fix directly on your branch.

henrikje commented 1 year ago

Fixed the linting issues! Sorry I missed them.

As a side note, I've checked the GitHub option to "allow edits by maintainers". That should give you access to commit to this branch, right?

iurysza commented 1 year ago

Hmm, weird. I couldn't push when I tried. Maybe I did something wrong :p But the build is green now. Thanks!