sbt Pin Library to Project Version of Scala


If your project has this:

scalaVersion := 2.11  // Replace '2.11' with the version of Scala your project is running on

Then you can use %% to automatically get the version of the library compiled against the version of Scala the project is using:

libraryDependencies += "com.typesafe.slick" %% "slick" % "3.2.0-M1"

Note that having the above two lines is equivalent to having this one line:

libraryDependencies += "com.typesafe.slick" % "slick_2.11" % "3.2.0-M1"