Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find unused sbt dependencies?

Tags:

scala

sbt

My build.sbt has a lot of dependencies now. How do I know which dependencies are actually being used?

Maven seems to have dependency:analyse http://maven.apache.org/plugins/maven-dependency-plugin/ Is there something similar for sbt?

like image 824
Akhil Avatar asked Aug 20 '14 17:08

Akhil


1 Answers

There is the sbt-explicit-dependencies plugin, which has been developed recently. It has direct commands in the SBT console to:

  • Enforce explicit direct declaration of dependencies, thus disallowing transitive dependencies.
  • Detect and remove unneeded dependencies.
like image 195
Diego E. Alonso-Blas Avatar answered Sep 22 '22 16:09

Diego E. Alonso-Blas