conference-app-2023 icon indicating copy to clipboard operation
conference-app-2023 copied to clipboard

[Build] Introduce https://github.com/iurysza/module-graph

Open tomoya0x00 opened this issue 1 year ago • 9 comments

https://github.com/iurysza/module-graph で Mermaid でgradle moduleの依存図を吐けるので、入れてみると便利そう。

tomoya0x00 avatar Jun 09 '23 12:06 tomoya0x00

2stepに分けた方が良いかも

  • 上記を導入する
  • 自動で上記をGitHub Actionで実行する(何トリガーでやるかが悩ましい)

tomoya0x00 avatar Jun 09 '23 12:06 tomoya0x00

Maybe we can use the init script. https://github.com/android/nowinandroid/blob/main/gradle/init.gradle.kts https://docs.gradle.org/current/userguide/init_scripts.html

takahirom avatar Jun 10 '23 07:06 takahirom

I would like to work on this issue.

hisakaz0 avatar Sep 10 '23 07:09 hisakaz0

@hisakaz0 Thanks! Assigned!

momomomo111 avatar Sep 10 '23 09:09 momomomo111

@momomomo111 @tomoya0x00 @takahirom

I tried to apply module-graph plugin, but the generated graph has duplicated edges. (e.g. there are many edges of sessions -> ui )

https://github.com/hisakaz0/conference-app-2023/commit/c39c60827be65e03c02ee89b7c1a98b992ba42bd

The result is not good. So I think that we should fix the problem first. How about you?

hisakaz0 avatar Sep 11 '23 13:09 hisakaz0

I work on the gradle plugin.

  • https://github.com/iurysza/module-graph/issues/22

hisakaz0 avatar Sep 11 '23 14:09 hisakaz0

Is there any possibility we have a duplicated dependency?

takahirom avatar Sep 11 '23 14:09 takahirom

Okay. I investigate more.

hisakaz0 avatar Sep 12 '23 13:09 hisakaz0

After investigating, there are no duplicate dependencies in our project 😢

A gradle project has multiple configurations, and each configuration has multiple dependencies. In feature:sponsors project, the project has multiple configurations such as implementation, devDebugUnitTestCompileClasspath and more.

This plugin represents dependencies by each configuration. Therefore, there are one or more lines between projects.

https://github.com/iurysza/module-graph/blob/bc4d47e6b98946ccfb908ca5fad59afee34a7c20/plugin-build/modulegraph/src/main/kotlin/dev/iurysouza/modulegraph/gradle/ProjectParser.kt#L7

https://github.com/iurysza/module-graph/blob/bc4d47e6b98946ccfb908ca5fad59afee34a7c20/plugin-build/modulegraph/src/main/kotlin/dev/iurysouza/modulegraph/MermaidGraph.kt#L81

If we want a graph that I pushed, it's okay. But, if we want an abstract graph, I will stop my work.

hisakaz0 avatar Sep 12 '23 15:09 hisakaz0