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
346 stars 13 forks source link

Dependency edges are duplicated. #22

Closed hisakaz0 closed 1 year ago

hisakaz0 commented 1 year ago

🐛 Describe the bug

When createModuleGraph task is executed in this project, there are duplicated dependency edges.

Maybe when a gradle module has multi sourceSets, this problem occurred .

⚠️ Current behavior

A dependency(for examplealpha --> beta) edges are duplicated.

✅ Expected behavior

A dependency represents only one edge.

💣 Steps to reproduce

  1. clone this repository https://github.com/hisakaz0/conference-app-2023/
  2. switch branch to mod-graph.
  3. ./gradlew createModuleGraph

📷 Screenshots

📱 Tech info

hisakaz0 commented 1 year ago

At the same time, I fix this issue.

The fixing is this. https://github.com/hisakaz0/module-graph/tree/fix-duplicate-edge

steps to validate

  1. clone https://github.com/hisakaz0/conference-app-2023/
  2. switch branch to repro-duplicate-edges
  3. install submodule
  4. cd module-graph
  5. ./gradlew build publishToMavenLocal
  6. cd ..
  7. ./gradlew createModuleGraph