Tutorial by Examples

libraryDependency is the SettingKey that handles 'managed' library dependencies, which are dependencies that are automatically downloaded, matching the supplied versions. To add a single dependency: libraryDependencies += "com.typesafe.slick" %% "slick" % "3.2.0-M1" ...
A repository is a place that SBT looks for libraryDependencies. If the build complains about not finding a dependency, it can be lacking the correct repository. Within SBT, the repositories are listed in the resolvers SettingKey: resolvers += "Flyway" at "https://flywaydb.org/repo&qu...
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&...
A library can be 'pinned' to a specific version of Scala using the % operator between the groupId and the artifactId (the first two strings in a library dependency). In this example, we pin the library with the artifactId of slick to Scala version 2.10: libraryDependencies += "com.typesafe.sl...

Page 1 of 1