Working with dependencies in Scala¶
sbt¶
Generating scala-dependency-tree.txt or sbt-dependency-tree.txt files¶
-
Setting the width of the dependency graph
To generate a full dependency graph, add the following line to the
build.sbtfile:Alternatively, you can set the
asciiGraphWidthvalue globally. -
Generating dependency tree
Run the following command to generate dependency tree:
Make sure to save the file with the name
scala-dependency-tree.txtorsbt-dependency-tree.txt, as these are the only names supported for correct parsing. -
Scanning the generated file
The console agent option
--sbt-resolvein the scan command is not needed in this case, as it scans the already generated tree with the full dependency structure.