siggijons / graph-untangler-plugin

Gradle plugin to help untangle your dependencies.
Apache License 2.0
43 stars 1 forks source link

Rendering issue with `fillcolor="null"` #3

Closed SimonMarquis closed 1 year ago

SimonMarquis commented 1 year ago

I'm currently running the plugin on Windows. When executing gradlew analyzeModuleGraph, the resulting dotfiles contains fillcolor="null", making the nodes filled with a black color:

image

SimonMarquis commented 1 year ago

What about changing this

https://github.com/siggijons/graph-untangler-plugin/blob/67ea6e0667dbfe8b26bcc5b90072011bfa4699a3/plugin/src/main/kotlin/net/siggijons/gradle/graphuntangler/writer/GraphvizWriter.kt#L49-L53

Into that:

            buildMap {
                put("label", DefaultAttribute.createAttribute(label))
                put("style", DefaultAttribute.createAttribute("filled"))
                DefaultAttribute.createAttribute(color)?.let { put("fillcolor", it) }
            }

or

            buildMap {
                put("label", DefaultAttribute.createAttribute(label))
                DefaultAttribute.createAttribute(color)?.let {
                    put("style", DefaultAttribute.createAttribute("filled"))
                    put("fillcolor", it)
                }
            }

WDYT?