Repository: vanniktech/gradle-dependency-graph-generator-plugin (kotlin)

Issue:
Execution failed "TypeError: Module.print is not a function" for a mono repo
```
> Task :generateDependencyGraph
Warning: Nashorn engine is planned to be removed from a future JDK release

> Task :generateDependencyGraph FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':generateDependencyGraph'.
> TypeError: Module.print is not a function
```

It doesn't matter if I use the 0.8.0-SNAPSHOT or 0.7.0.
Any idea on how to fix that?

Pull request:
Closes #145 and should fix #144 as well.

Patch:
diff --git a/build.gradle b/build.gradle
index 3532d1f..d38498b 100755
--- a/build.gradle
+++ b/build.gradle
@@ -64,7 +64,7 @@ repositories {
 dependencies {
   implementation localGroovy()
   implementation gradleApi()
-  api "guru.nidi:graphviz-java:0.8.1"
+  api "guru.nidi:graphviz-java:0.18.1"
 
   testImplementation 'junit:junit:4.13.2'
   testImplementation "com.android.tools.build:gradle:7.0.4"
@@ -90,4 +90,5 @@ test {
   testLogging {
     exceptionFormat "full"
   }
+  jvmArgs("-Xmx2048m")
 }
diff --git a/gradle.properties b/gradle.properties
index 6d78bc5..90c2161 100755
--- a/gradle.properties
+++ b/gradle.properties
@@ -18,4 +18,6 @@ POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt
 POM_LICENCE_DIST=repo
 
 POM_DEVELOPER_ID=vanniktech
-POM_DEVELOPER_NAME=Niklas Baudy
\ No newline at end of file
+POM_DEVELOPER_NAME=Niklas Baudy
+
+org.gradle.jvmargs=-Xmx2048m
diff --git a/src/main/kotlin/com/vanniktech/dependency/graph/generator/DependencyGraphGenerator.kt b/src/main/kotlin/com/vanniktech/dependency/graph/generator/DependencyGraphGenerator.kt
index 2002746..076b284 100644
--- a/src/main/kotlin/com/vanniktech/dependency/graph/generator/DependencyGraphGenerator.kt
+++ b/src/main/kotlin/com/vanniktech/dependency/graph/generator/DependencyGraphGenerator.kt
@@ -1,9 +1,9 @@
 package com.vanniktech.dependency.graph.generator
 
 import com.vanniktech.dependency.graph.generator.DependencyGraphGeneratorExtension.Generator
-import guru.nidi.graphviz.attribute.Font
 import guru.nidi.graphviz.attribute.Label
 import guru.nidi.graphviz.attribute.Rank
+import guru.nidi.graphviz.attribute.Rank.RankType
 import guru.nidi.graphviz.attribute.Shape
 import guru.nidi.graphviz.model.Factory.graph
 import guru.nidi.graphviz.model.Factory.mutGraph
@@ -31,8 +31,6 @@ internal class DependencyGraphGenerator(
       graph.graphAttrs().add(it)
     }
 
-    graph.nodeAttrs().add(Font.name("Times New Roman"))
-
     val projects = (if (project.subprojects.size > 0) project.subprojects else setOf(project))
       .filter { generator.includeProject(it) }
 
@@ -67,7 +65,7 @@ internal class DependencyGraphGenerator(
       graph.add(
         graph()
           .graphAttr()
-          .with(Rank.SAME)
+          .with(Rank.inSubgraph(RankType.SAME))
           .with(*rootNodes.map { mutNode(it) }.toTypedArray())
       )
     }
diff --git a/src/main/kotlin/com/vanniktech/dependency/graph/generator/ProjectDependencyGraphGenerator.kt b/src/main/kotlin/com/vanniktech/dependency/graph/generator/ProjectDependencyGraphGenerator.kt
index 9ea4998..d70ae45 100644
--- a/src/main/kotlin/com/vanniktech/dependency/graph/generator/ProjectDependencyGraphGenerator.kt
+++ b/src/main/kotlin/com/vanniktech/dependency/graph/generator/ProjectDependencyGraphGenerator.kt
@@ -4,6 +4,7 @@ import guru.nidi.graphviz.attribute.Color
 import guru.nidi.graphviz.attribute.Font
 import guru.nidi.graphviz.attribute.Label
 import guru.nidi.graphviz.attribute.Rank
+import guru.nidi.graphviz.attribute.Rank.RankType
 import guru.nidi.graphviz.attribute.Shape
 import guru.nidi.graphviz.attribute.Style
 import guru.nidi.graphviz.model.Factory.graph
@@ -40,7 +41,7 @@ internal class ProjectDependencyGraphGenerator(
 
     val graph = mutGraph().setDirected(true)
     graph.graphAttrs().add(Label.of(project.name).locate(Label.Location.TOP), Font.size(DEFAULT_FONT_SIZE))
-    graph.nodeAttrs().add(Font.name("Times New Roman"), Style.FILLED)
+    graph.nodeAttrs().add(Style.FILLED)
     projects.forEach { addNode(it, dependencies, graph) }
     rankRootProjects(graph, projects, dependencies)
     addDependencies(dependencies, graph)
@@ -72,7 +73,7 @@ internal class ProjectDependencyGraphGenerator(
     graph.add(
       graph()
         .graphAttr()
-        .with(Rank.SAME)
+        .with(Rank.inSubgraph(RankType.SAME))
         .with(*projects.filter { project -> dependencies.none { it.to == project } }.map { mutNode(it.path) }.toTypedArray())
     )
   }


Test patch:
diff --git a/src/test/java/com/vanniktech/dependency/graph/generator/DependencyGraphGeneratorPluginTest.kt b/src/test/java/com/vanniktech/dependency/graph/generator/DependencyGraphGeneratorPluginTest.kt
index 92a5db4..5a8c658 100644
--- a/src/test/java/com/vanniktech/dependency/graph/generator/DependencyGraphGeneratorPluginTest.kt
+++ b/src/test/java/com/vanniktech/dependency/graph/generator/DependencyGraphGeneratorPluginTest.kt
@@ -77,11 +77,11 @@ class DependencyGraphGeneratorPluginTest {
     )
 
     fun runBuild(): BuildResult {
-      return GradleRunner.create()
+      return GradleRunner.create().withDebug(true)
         .withPluginClasspath()
         .withGradleVersion(gradleVersion)
         .withProjectDir(testProjectDir.root)
-        .withArguments("generateDependencyGraph", "generateProjectDependencyGraph")
+        .withArguments("generateDependencyGraph", "generateProjectDependencyGraph", "-Dorg.gradle.jvmargs=-Xmx2048m", "--stacktrace")
         .build()
     }
 
@@ -96,13 +96,14 @@ class DependencyGraphGeneratorPluginTest {
     assertEquals(
       """
         digraph "G" {
-        node ["fontname"="Times New Roman"]
-        "${testProjectDir.root.name}" ["shape"="rectangle","label"="${testProjectDir.root.name}"]
-        "orgjetbrainskotlinkotlinstdlib" ["shape"="rectangle","label"="kotlin-stdlib"]
-        "orgjetbrainsannotations" ["shape"="rectangle","label"="jetbrains-annotations"]
-        "ioreactivexrxjava2rxjava" ["shape"="rectangle","label"="rxjava"]
-        "orgreactivestreamsreactivestreams" ["shape"="rectangle","label"="reactive-streams"]
+        edge ["dir"="forward"]
+        "${testProjectDir.root.name}" ["label"="${testProjectDir.root.name}","shape"="rectangle"]
+        "orgjetbrainskotlinkotlinstdlib" ["label"="kotlin-stdlib","shape"="rectangle"]
+        "orgjetbrainsannotations" ["label"="jetbrains-annotations","shape"="rectangle"]
+        "ioreactivexrxjava2rxjava" ["label"="rxjava","shape"="rectangle"]
+        "orgreactivestreamsreactivestreams" ["label"="reactive-streams","shape"="rectangle"]
         {
+        edge ["dir"="none"]
         graph ["rank"="same"]
         "${testProjectDir.root.name}"
         }
@@ -122,9 +123,11 @@ class DependencyGraphGeneratorPluginTest {
     assertEquals(
       """
         digraph {
-        graph ["fontsize"="35","label"="${testProjectDir.root.name}","labelloc"="t"]
-        node ["fontname"="Times New Roman","style"="filled"]
+        edge ["dir"="forward"]
+        graph ["label"="${testProjectDir.root.name}","labelloc"="t","fontsize"="35"]
+        node ["style"="filled"]
         {
+        edge ["dir"="none"]
         graph ["rank"="same"]
         }
         }
@@ -244,11 +247,11 @@ class DependencyGraphGeneratorPluginTest {
 
     val empty = testProjectDir.newFolder("empty").run { parentFile.name + name }
 
-    val result = GradleRunner.create()
+    val result = GradleRunner.create().withDebug(true)
       .withPluginClasspath()
       .withGradleVersion("7.4.2")
       .withProjectDir(testProjectDir.root)
-      .withArguments("generateDependencyGraph", "generateProjectDependencyGraph", "app:generateProjectDependencyGraph")
+      .withArguments("generateDependencyGraph", "generateProjectDependencyGraph", "app:generateProjectDependencyGraph", "-Dorg.gradle.jvmargs=-Xmx2048m", "--stacktrace")
       .build()
 
     result.tasks.filter { it.path.contains("DependencyGraph") }.forEach {
@@ -261,17 +264,18 @@ class DependencyGraphGeneratorPluginTest {
     assertEquals(
       """
         digraph "G" {
-        node ["fontname"="Times New Roman"]
-        "$app" ["shape"="rectangle","label"="app"]
-        "$lib1" ["shape"="rectangle","label"="lib1"]
-        "$lib" ["shape"="rectangle","label"="lib"]
-        "ioreactivexrxjava2rxjava" ["shape"="rectangle","label"="rxjava"]
-        "orgreactivestreamsreactivestreams" ["shape"="rectangle","label"="reactive-streams"]
-        "orgjetbrainskotlinkotlinstdlib" ["shape"="rectangle","label"="kotlin-stdlib"]
-        "orgjetbrainsannotations" ["shape"="rectangle","label"="jetbrains-annotations"]
-        "$lib2" ["shape"="rectangle","label"="lib2"]
-        "$empty" ["shape"="rectangle","label"="empty"]
+        edge ["dir"="forward"]
+        "$app" ["label"="app","shape"="rectangle"]
+        "$lib1" ["label"="lib1","shape"="rectangle"]
+        "$lib" ["label"="lib","shape"="rectangle"]
+        "ioreactivexrxjava2rxjava" ["label"="rxjava","shape"="rectangle"]
+        "orgreactivestreamsreactivestreams" ["label"="reactive-streams","shape"="rectangle"]
+        "orgjetbrainskotlinkotlinstdlib" ["label"="kotlin-stdlib","shape"="rectangle"]
+        "orgjetbrainsannotations" ["label"="jetbrains-annotations","shape"="rectangle"]
+        "$lib2" ["label"="lib2","shape"="rectangle"]
+        "$empty" ["label"="empty","shape"="rectangle"]
         {
+        edge ["dir"="none"]
         graph ["rank"="same"]
         "$app"
         "$empty"
@@ -294,13 +298,15 @@ class DependencyGraphGeneratorPluginTest {
 
     fun projectDependencyGraph(label: String) = """
         digraph {
-        graph ["fontsize"="35","label"="$label","labelloc"="t"]
-        node ["fontname"="Times New Roman","style"="filled"]
-        ":app" ["fillcolor"="#ff8a65","shape"="rectangle"]
+        edge ["dir"="forward"]
+        graph ["label"="$label","labelloc"="t","fontsize"="35"]
+        node ["style"="filled"]
+        ":app" ["shape"="rectangle","fillcolor"="#ff8a65"]
         ":lib1" ["fillcolor"="#ff8a65"]
         ":lib" ["fillcolor"="#ff8a65"]
         ":lib2" ["fillcolor"="#ff8a65"]
         {
+        edge ["dir"="none"]
         graph ["rank"="same"]
         ":app"
         }
diff --git a/src/test/java/com/vanniktech/dependency/graph/generator/DependencyGraphGeneratorTest.kt b/src/test/java/com/vanniktech/dependency/graph/generator/DependencyGraphGeneratorTest.kt
index 1f2c40a..caa9a9a 100644
--- a/src/test/java/com/vanniktech/dependency/graph/generator/DependencyGraphGeneratorTest.kt
+++ b/src/test/java/com/vanniktech/dependency/graph/generator/DependencyGraphGeneratorTest.kt
@@ -79,9 +79,10 @@ class DependencyGraphGeneratorTest {
     assertEquals(
       """
         digraph "G" {
-        node ["fontname"="Times New Roman"]
-        "singleempty" ["shape"="rectangle","label"="singleempty"]
+        edge ["dir"="forward"]
+        "singleempty" ["label"="singleempty","shape"="rectangle"]
         {
+        edge ["dir"="none"]
         graph ["rank"="same"]
         "singleempty"
         }
@@ -95,7 +96,6 @@ class DependencyGraphGeneratorTest {
     assertEquals(
       """
         digraph "G" {
-        node ["fontname"="Times New Roman"]
         }
       """.trimIndent(),
       DependencyGraphGenerator(singleEmpty, ALL.copy(includeProject = { false })).generateGraph().toString()
@@ -106,9 +106,10 @@ class DependencyGraphGeneratorTest {
     assertEquals(
       """
         digraph "G" {
-        node ["fontname"="Times New Roman"]
-        "singleempty" ["shape"="rectangle","label"="singleempty"]
+        edge ["dir"="forward"]
+        "singleempty" ["label"="singleempty","shape"="rectangle"]
         {
+        edge ["dir"="none"]
         graph ["rank"="same"]
         "singleempty"
         }
@@ -122,8 +123,7 @@ class DependencyGraphGeneratorTest {
     assertEquals(
       """
         graph "G" {
-        node ["fontname"="Times New Roman"]
-        "singleempty" ["shape"="rectangle","label"="singleempty"]
+        "singleempty" ["label"="singleempty","shape"="rectangle"]
         {
         graph ["rank"="same"]
         "singleempty"
@@ -138,10 +138,11 @@ class DependencyGraphGeneratorTest {
     assertEquals(
       """
         digraph "G" {
-        graph ["labeljust"="l","labelloc"="t","label"="my custom header"]
-        node ["fontname"="Times New Roman"]
-        "singleempty" ["shape"="rectangle","label"="singleempty"]
+        edge ["dir"="forward"]
+        graph ["label"="my custom header","labeljust"="l","labelloc"="t"]
+        "singleempty" ["label"="singleempty","shape"="rectangle"]
         {
+        edge ["dir"="none"]
         graph ["rank"="same"]
         "singleempty"
         }
@@ -155,9 +156,10 @@ class DependencyGraphGeneratorTest {
     assertEquals(
       """
         digraph "G" {
-        node ["fontname"="Times New Roman"]
-        "singleempty" ["shape"="egg","color"="#ff0099","style"="dotted","label"="singleempty"]
+        edge ["dir"="forward"]
+        "singleempty" ["label"="singleempty","shape"="egg","style"="dotted","color"="#ff0099"]
         {
+        edge ["dir"="none"]
         graph ["rank"="same"]
         "singleempty"
         }
@@ -171,13 +173,14 @@ class DependencyGraphGeneratorTest {
     assertEquals(
       """
         digraph "G" {
-        node ["fontname"="Times New Roman"]
-        "single" ["shape"="rectangle","label"="single"]
-        "orgjetbrainskotlinkotlinstdlib" ["shape"="rectangle","label"="kotlin-stdlib"]
-        "orgjetbrainsannotations" ["shape"="rectangle","label"="jetbrains-annotations"]
-        "ioreactivexrxjava2rxjava" ["shape"="rectangle","label"="rxjava"]
-        "orgreactivestreamsreactivestreams" ["shape"="rectangle","label"="reactive-streams"]
+        edge ["dir"="forward"]
+        "single" ["label"="single","shape"="rectangle"]
+        "orgjetbrainskotlinkotlinstdlib" ["label"="kotlin-stdlib","shape"="rectangle"]
+        "orgjetbrainsannotations" ["label"="jetbrains-annotations","shape"="rectangle"]
+        "ioreactivexrxjava2rxjava" ["label"="rxjava","shape"="rectangle"]
+        "orgreactivestreamsreactivestreams" ["label"="reactive-streams","shape"="rectangle"]
         {
+        edge ["dir"="none"]
         graph ["rank"="same"]
         "single"
         }
@@ -203,13 +206,14 @@ class DependencyGraphGeneratorTest {
     assertEquals(
       """
         digraph "G" {
-        node ["fontname"="Times New Roman"]
-        "single" ["shape"="rectangle","label"="single"]
-        "orgjetbrainskotlinkotlinstdlib" ["shape"="rectangle","color"="0.833904937402929 0.4047932090555708 0.5440948801677342","style"="filled","label"="kotlin-stdlib"]
-        "orgjetbrainsannotations" ["shape"="rectangle","color"="0.44658757938141413 0.25639393293458856 0.2315484830185478","style"="filled","label"="jetbrains-annotations"]
-        "ioreactivexrxjava2rxjava" ["shape"="rectangle","color"="0.37947834890750454 0.21008099121996504 0.6969226044909884","style"="filled","label"="rxjava"]
-        "orgreactivestreamsreactivestreams" ["shape"="rectangle","color"="0.3100028267238165 0.7876064423347447 0.6784992909440705","style"="filled","label"="reactive-streams"]
+        edge ["dir"="forward"]
+        "single" ["label"="single","shape"="rectangle"]
+        "orgjetbrainskotlinkotlinstdlib" ["label"="kotlin-stdlib","shape"="rectangle","style"="filled","color"="0.833904937402929 0.4047932090555708 0.5440948801677342"]
+        "orgjetbrainsannotations" ["label"="jetbrains-annotations","shape"="rectangle","style"="filled","color"="0.44658757938141413 0.25639393293458856 0.2315484830185478"]
+        "ioreactivexrxjava2rxjava" ["label"="rxjava","shape"="rectangle","style"="filled","color"="0.37947834890750454 0.21008099121996504 0.6969226044909884"]
+        "orgreactivestreamsreactivestreams" ["label"="reactive-streams","shape"="rectangle","style"="filled","color"="0.3100028267238165 0.7876064423347447 0.6784992909440705"]
         {
+        edge ["dir"="none"]
         graph ["rank"="same"]
         "single"
         }
@@ -227,11 +231,12 @@ class DependencyGraphGeneratorTest {
     assertEquals(
       """
         digraph "G" {
-        node ["fontname"="Times New Roman"]
-        "single" ["shape"="rectangle","label"="single"]
-        "orgjetbrainskotlinkotlinstdlib" ["shape"="rectangle","label"="kotlin-stdlib"]
-        "ioreactivexrxjava2rxjava" ["shape"="rectangle","label"="rxjava"]
+        edge ["dir"="forward"]
+        "single" ["label"="single","shape"="rectangle"]
+        "orgjetbrainskotlinkotlinstdlib" ["label"="kotlin-stdlib","shape"="rectangle"]
+        "ioreactivexrxjava2rxjava" ["label"="rxjava","shape"="rectangle"]
         {
+        edge ["dir"="none"]
         graph ["rank"="same"]
         "single"
         }
@@ -247,11 +252,12 @@ class DependencyGraphGeneratorTest {
     assertEquals(
       """
         digraph "G" {
-        node ["fontname"="Times New Roman"]
-        "single" ["shape"="rectangle","label"="single"]
-        "orgjetbrainskotlinkotlinstdlib" ["shape"="rectangle","label"="kotlin-stdlib"]
-        "orgjetbrainsannotations" ["shape"="rectangle","label"="jetbrains-annotations"]
+        edge ["dir"="forward"]
+        "single" ["label"="single","shape"="rectangle"]
+        "orgjetbrainskotlinkotlinstdlib" ["label"="kotlin-stdlib","shape"="rectangle"]
+        "orgjetbrainsannotations" ["label"="jetbrains-annotations","shape"="rectangle"]
         {
+        edge ["dir"="none"]
         graph ["rank"="same"]
         "single"
         }
@@ -269,25 +275,26 @@ class DependencyGraphGeneratorTest {
     assertEquals(
       """
         digraph "G" {
-        node ["fontname"="Times New Roman"]
-        "singleempty" ["shape"="rectangle","label"="singleempty"]
-        "orgapachexmlgraphicsbatikgvt" ["shape"="rectangle","label"="batik-gvt"]
-        "orgapachexmlgraphicsbatikbridge" ["shape"="rectangle","label"="batik-bridge"]
-        "orgapachexmlgraphicsbatikscript" ["shape"="rectangle","label"="batik-script"]
-        "orgapachexmlgraphicsbatikawtutil" ["shape"="rectangle","label"="batik-awt-util"]
-        "orgapachexmlgraphicsbatikutil" ["shape"="rectangle","label"="batik-util"]
-        "xmlapisxmlapis" ["shape"="rectangle","label"="xml-apis"]
-        "orgapachexmlgraphicsbatiksvgdom" ["shape"="rectangle","label"="batik-svg-dom"]
-        "orgapachexmlgraphicsbatikanim" ["shape"="rectangle","label"="batik-anim"]
-        "orgapachexmlgraphicsbatikparser" ["shape"="rectangle","label"="batik-parser"]
-        "orgapachexmlgraphicsbatikxml" ["shape"="rectangle","label"="batik-xml"]
-        "orgapachexmlgraphicsbatikdom" ["shape"="rectangle","label"="batik-dom"]
-        "orgapachexmlgraphicsbatikcss" ["shape"="rectangle","label"="batik-css"]
-        "orgapachexmlgraphicsbatikext" ["shape"="rectangle","label"="batik-ext"]
-        "xmlapisxmlapisext" ["shape"="rectangle","label"="xml-apis-ext"]
-        "xalanxalan" ["shape"="rectangle","label"="xalan"]
-        "orgapachexmlgraphicsbatikjs" ["shape"="rectangle","label"="batik-js"]
+        edge ["dir"="forward"]
+        "singleempty" ["label"="singleempty","shape"="rectangle"]
+        "orgapachexmlgraphicsbatikgvt" ["label"="batik-gvt","shape"="rectangle"]
+        "orgapachexmlgraphicsbatikbridge" ["label"="batik-bridge","shape"="rectangle"]
+        "orgapachexmlgraphicsbatikscript" ["label"="batik-script","shape"="rectangle"]
+        "orgapachexmlgraphicsbatikawtutil" ["label"="batik-awt-util","shape"="rectangle"]
+        "orgapachexmlgraphicsbatikutil" ["label"="batik-util","shape"="rectangle"]
+        "xmlapisxmlapis" ["label"="xml-apis","shape"="rectangle"]
+        "orgapachexmlgraphicsbatiksvgdom" ["label"="batik-svg-dom","shape"="rectangle"]
+        "orgapachexmlgraphicsbatikanim" ["label"="batik-anim","shape"="rectangle"]
+        "orgapachexmlgraphicsbatikparser" ["label"="batik-parser","shape"="rectangle"]
+        "orgapachexmlgraphicsbatikxml" ["label"="batik-xml","shape"="rectangle"]
+        "orgapachexmlgraphicsbatikdom" ["label"="batik-dom","shape"="rectangle"]
+        "orgapachexmlgraphicsbatikcss" ["label"="batik-css","shape"="rectangle"]
+        "orgapachexmlgraphicsbatikext" ["label"="batik-ext","shape"="rectangle"]
+        "xmlapisxmlapisext" ["label"="xml-apis-ext","shape"="rectangle"]
+        "xalanxalan" ["label"="xalan","shape"="rectangle"]
+        "orgapachexmlgraphicsbatikjs" ["label"="batik-js","shape"="rectangle"]
         {
+        edge ["dir"="none"]
         graph ["rank"="same"]
         "singleempty"
         }
@@ -366,14 +373,15 @@ class DependencyGraphGeneratorTest {
     assertEquals(
       """
         digraph "G" {
-        node ["fontname"="Times New Roman"]
-        "single" ["shape"="rectangle","label"="single"]
-        "orgjetbrainskotlinkotlinstdlib" ["shape"="rectangle","label"="kotlin-stdlib"]
-        "orgjetbrainsannotations" ["shape"="rectangle","label"="jetbrains-annotations"]
-        "ioreactivexrxjava2rxjava" ["shape"="rectangle","label"="rxjava"]
-        "orgreactivestreamsreactivestreams" ["shape"="rectangle","label"="reactive-streams"]
-        "ioreactivexrxjava2rxandroid" ["shape"="rectangle","label"="rxandroid"]
+        edge ["dir"="forward"]
+        "single" ["label"="single","shape"="rectangle"]
+        "orgjetbrainskotlinkotlinstdlib" ["label"="kotlin-stdlib","shape"="rectangle"]
+        "orgjetbrainsannotations" ["label"="jetbrains-annotations","shape"="rectangle"]
+        "ioreactivexrxjava2rxjava" ["label"="rxjava","shape"="rectangle"]
+        "orgreactivestreamsreactivestreams" ["label"="reactive-streams","shape"="rectangle"]
+        "ioreactivexrxjava2rxandroid" ["label"="rxandroid","shape"="rectangle"]
         {
+        edge ["dir"="none"]
         graph ["rank"="same"]
         "single"
         }
@@ -393,15 +401,16 @@ class DependencyGraphGeneratorTest {
     assertEquals(
       """
         digraph "G" {
-        node ["fontname"="Times New Roman"]
-        "multimulti1" ["shape"="rectangle","label"="multi1"]
-        "orgjetbrainskotlinkotlinstdlib" ["shape"="rectangle","label"="kotlin-stdlib"]
-        "orgjetbrainsannotations" ["shape"="rectangle","label"="jetbrains-annotations"]
-        "ioreactivexrxjava2rxjava" ["shape"="rectangle","label"="rxjava"]
-        "orgreactivestreamsreactivestreams" ["shape"="rectangle","label"="reactive-streams"]
-        "multimulti2" ["shape"="rectangle","label"="multi2"]
-        "ioreactivexrxjava2rxandroid" ["shape"="rectangle","label"="rxandroid"]
+        edge ["dir"="forward"]
+        "multimulti1" ["label"="multi1","shape"="rectangle"]
+        "orgjetbrainskotlinkotlinstdlib" ["label"="kotlin-stdlib","shape"="rectangle"]
+        "orgjetbrainsannotations" ["label"="jetbrains-annotations","shape"="rectangle"]
+        "ioreactivexrxjava2rxjava" ["label"="rxjava","shape"="rectangle"]
+        "orgreactivestreamsreactivestreams" ["label"="reactive-streams","shape"="rectangle"]
+        "multimulti2" ["label"="multi2","shape"="rectangle"]
+        "ioreactivexrxjava2rxandroid" ["label"="rxandroid","shape"="rectangle"]
         {
+        edge ["dir"="none"]
         graph ["rank"="same"]
         "multimulti1"
         "multimulti2"
@@ -427,18 +436,19 @@ class DependencyGraphGeneratorTest {
     assertEquals(
       """
         digraph "G" {
-        node ["fontname"="Times New Roman"]
-        "android" ["shape"="rectangle","label"="android"]
-        "androidarchpersistenceroomruntime" ["shape"="rectangle","label"="persistence-room-runtime"]
-        "androidarchpersistenceroomcommon" ["shape"="rectangle","label"="persistence-room-common"]
-        "comandroidsupportsupportannotations" ["shape"="rectangle","label"="support-annotations"]
-        "androidarchpersistencedbframework" ["shape"="rectangle","label"="persistence-db-framework"]
-        "androidarchpersistencedb" ["shape"="rectangle","label"="persistence-db"]
-        "androidarchcoreruntime" ["shape"="rectangle","label"="core-runtime"]
-        "androidarchcorecommon" ["shape"="rectangle","label"="core-common"]
-        "comandroidsupportsupportcoreutils" ["shape"="rectangle","label"="support-core-utils"]
-        "comandroidsupportsupportcompat" ["shape"="rectangle","label"="support-compat"]
+        edge ["dir"="forward"]
+        "android" ["label"="android","shape"="rectangle"]
+        "androidarchpersistenceroomruntime" ["label"="persistence-room-runtime","shape"="rectangle"]
+        "androidarchpersistenceroomcommon" ["label"="persistence-room-common","shape"="rectangle"]
+        "comandroidsupportsupportannotations" ["label"="support-annotations","shape"="rectangle"]
+        "androidarchpersistencedbframework" ["label"="persistence-db-framework","shape"="rectangle"]
+        "androidarchpersistencedb" ["label"="persistence-db","shape"="rectangle"]
+        "androidarchcoreruntime" ["label"="core-runtime","shape"="rectangle"]
+        "androidarchcorecommon" ["label"="core-common","shape"="rectangle"]
+        "comandroidsupportsupportcoreutils" ["label"="support-core-utils","shape"="rectangle"]
+        "comandroidsupportsupportcompat" ["label"="support-compat","shape"="rectangle"]
         {
+        edge ["dir"="none"]
         graph ["rank"="same"]
         "android"
         }
@@ -472,11 +482,12 @@ class DependencyGraphGeneratorTest {
     assertEquals(
       """
         digraph "G" {
-        node ["fontname"="Times New Roman"]
-        "android" ["shape"="rectangle","label"="android"]
-        "comsquareupsqldelightruntime" ["shape"="rectangle","label"="sqldelight-runtime"]
-        "comandroidsupportsupportannotations" ["shape"="rectangle","label"="support-annotations"]
+        edge ["dir"="forward"]
+        "android" ["label"="android","shape"="rectangle"]
+        "comsquareupsqldelightruntime" ["label"="sqldelight-runtime","shape"="rectangle"]
+        "comandroidsupportsupportannotations" ["label"="support-annotations","shape"="rectangle"]
         {
+        edge ["dir"="none"]
         graph ["rank"="same"]
         "android"
         }
@@ -504,14 +515,15 @@ class DependencyGraphGeneratorTest {
     assertEquals(
       """
         digraph "G" {
-        node ["fontname"="Times New Roman"]
-        "android" ["shape"="rectangle","label"="android"]
-        "ioreactivexrxjava2rxandroid" ["shape"="rectangle","label"="rxandroid"]
-        "ioreactivexrxjava2rxjava" ["shape"="rectangle","label"="rxjava"]
-        "orgreactivestreamsreactivestreams" ["shape"="rectangle","label"="reactive-streams"]
-        "orgjetbrainskotlinkotlinstdlib" ["shape"="rectangle","label"="kotlin-stdlib"]
-        "orgjetbrainsannotations" ["shape"="rectangle","label"="jetbrains-annotations"]
+        edge ["dir"="forward"]
+        "android" ["label"="android","shape"="rectangle"]
+        "ioreactivexrxjava2rxandroid" ["label"="rxandroid","shape"="rectangle"]
+        "ioreactivexrxjava2rxjava" ["label"="rxjava","shape"="rectangle"]
+        "orgreactivestreamsreactivestreams" ["label"="reactive-streams","shape"="rectangle"]
+        "orgjetbrainskotlinkotlinstdlib" ["label"="kotlin-stdlib","shape"="rectangle"]
+        "orgjetbrainsannotations" ["label"="jetbrains-annotations","shape"="rectangle"]
         {
+        edge ["dir"="none"]
         graph ["rank"="same"]
         "android"
         }
@@ -541,14 +553,15 @@ class DependencyGraphGeneratorTest {
     assertEquals(
       """
         digraph "G" {
-        node ["fontname"="Times New Roman"]
-        "android" ["shape"="rectangle","label"="android"]
-        "ioreactivexrxjava2rxjava" ["shape"="rectangle","label"="rxjava"]
-        "orgreactivestreamsreactivestreams" ["shape"="rectangle","label"="reactive-streams"]
-        "ioreactivexrxjava2rxandroid" ["shape"="rectangle","label"="rxandroid"]
-        "orgjetbrainskotlinkotlinstdlib" ["shape"="rectangle","label"="kotlin-stdlib"]
-        "orgjetbrainsannotations" ["shape"="rectangle","label"="jetbrains-annotations"]
+        edge ["dir"="forward"]
+        "android" ["label"="android","shape"="rectangle"]
+        "ioreactivexrxjava2rxjava" ["label"="rxjava","shape"="rectangle"]
+        "orgreactivestreamsreactivestreams" ["label"="reactive-streams","shape"="rectangle"]
+        "ioreactivexrxjava2rxandroid" ["label"="rxandroid","shape"="rectangle"]
+        "orgjetbrainskotlinkotlinstdlib" ["label"="kotlin-stdlib","shape"="rectangle"]
+        "orgjetbrainsannotations" ["label"="jetbrains-annotations","shape"="rectangle"]
         {
+        edge ["dir"="none"]
         graph ["rank"="same"]
         "android"
         }
@@ -578,11 +591,12 @@ class DependencyGraphGeneratorTest {
     assertEquals(
       """
         digraph "G" {
-        node ["fontname"="Times New Roman"]
-        "android" ["shape"="rectangle","label"="android"]
-        "orgjetbrainskotlinkotlinstdlib" ["shape"="rectangle","label"="kotlin-stdlib"]
-        "orgjetbrainsannotations" ["shape"="rectangle","label"="jetbrains-annotations"]
+        edge ["dir"="forward"]
+        "android" ["label"="android","shape"="rectangle"]
+        "orgjetbrainskotlinkotlinstdlib" ["label"="kotlin-stdlib","shape"="rectangle"]
+        "orgjetbrainsannotations" ["label"="jetbrains-annotations","shape"="rectangle"]
         {
+        edge ["dir"="none"]
         graph ["rank"="same"]
         "android"
         }
@@ -602,9 +616,10 @@ class DependencyGraphGeneratorTest {
     assertEquals(
       """
         digraph "G" {
-        node ["fontname"="Times New Roman"]
-        "android" ["shape"="rectangle","label"="android"]
+        edge ["dir"="forward"]
+        "android" ["label"="android","shape"="rectangle"]
         {
+        edge ["dir"="none"]
         graph ["rank"="same"]
         "android"
         }
@@ -622,9 +637,10 @@ class DependencyGraphGeneratorTest {
     assertEquals(
       """
         digraph "G" {
-        node ["fontname"="Times New Roman"]
-        "android" ["shape"="rectangle","label"="android"]
+        edge ["dir"="forward"]
+        "android" ["label"="android","shape"="rectangle"]
         {
+        edge ["dir"="none"]
         graph ["rank"="same"]
         "android"
         }
@@ -638,11 +654,12 @@ class DependencyGraphGeneratorTest {
     assertEquals(
       """
         digraph "G" {
-        node ["fontname"="Times New Roman"]
-        "rxjava" ["shape"="rectangle","label"="rxjava"]
-        "ioreactivexrxjava2rxjava" ["shape"="rectangle","label"="rxjava"]
-        "orgreactivestreamsreactivestreams" ["shape"="rectangle","label"="reactive-streams"]
+        edge ["dir"="forward"]
+        "rxjava" ["label"="rxjava","shape"="rectangle"]
+        "ioreactivexrxjava2rxjava" ["label"="rxjava","shape"="rectangle"]
+        "orgreactivestreamsreactivestreams" ["label"="reactive-streams","shape"="rectangle"]
         {
+        edge ["dir"="none"]
         graph ["rank"="same"]
         "rxjava"
         }