SBT plugin providing dependency-management helpers:
addSbtPlugin("org.hammerlab.sbt" % "deps" % "5.0.0")Several syntaxes allow for easier dependency-configuration:
dep(
guava // regular library dependency
scalatest tests, // test-scoped dependency
spark provided, // `provided` dependency
hadoop testtest, // test-scoped dependency on -tests JAR
kryo +testtest // combined `compile`- and `test->test`-scoped dependency
)This uses aliases defined in parent, but inline coordinates can be used:
dep(
"org.scalatest" ^^ "scalatest" ^ "3.0.0" tests
)^ replaces the usual % because we are using the Dep DSL defined in this project's lib module instead of SBT's ModuleIDs (the former maintains some structure to the metadata that is lost by conversion to ModuleID).
Dedicated settings are available for common dependency-configurations as well:
deps += guava
testDeps += scalatest
providedDeps += spark
testTestDeps += hadoop
compileAndTestDeps += kryoExclude coordinates from all dependencies:
excludes += "javax.servlet" % "servlet-api"
excludes += "org.scalatest" %% "scalatest" // cross-version syntax works!