These are chat archives for sbt/sbt

2nd
Jan 2017
megri
@megri
Jan 02 13:03

I can't figure out how to add test-dependencies to my subproject...

project/Dependencies.scala

def aLibs = Seq("org.some" %% "valid-artifact" % "1.2.3")
def bLibs = Seq("org.that" %% "has-artifact" % "4.5.6")
def testing = Seq("org.scalatest" %% "scalatest" % scalaTestVersion % Test)

def a = aLibs ++ testing
def b = bLibs ++ testing

build.sbt:

lazy val a = project.in(file("."))
  .settings(libraryDependencies ++= Dependencies.a)
  .dependsOn(b)

lazy val b = project.in(file("b"))
  .settings(libraryDependencies ++= Dependencies.b)

For some reason libraryDependencies for project "a" shows scalatest (in both compile and test) while project "b" doesn't show scalatest for either, but it shows the other dependency

Never mind! I'm an idiot :)
As so often I just needed a rubber duck to figure out my error :)