-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
39 lines (33 loc) · 1.26 KB
/
build.sbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name := "clob-example"
version := "3.1"
scalaVersion := "2.11.7"
scalacOptions ++= Seq(
"-deprecation",
"-encoding", "UTF-8",
"-unchecked",
"-feature",
"-language:implicitConversions",
"-language:postfixOps",
"-Ywarn-dead-code"
)
libraryDependencies ++= Seq(
"org.scala-lang" % "scala-reflect" % scalaVersion.value,
"com.typesafe.slick" %% "slick" % "3.1.0",
"com.h2database" % "h2" % "1.4.185",
"org.postgresql" % "postgresql" % "9.3-1100-jdbc41",
"mysql" % "mysql-connector-java" % "5.1.35",
"ch.qos.logback" % "logback-classic" % "1.1.2",
"joda-time" % "joda-time" % "2.6",
"org.joda" % "joda-convert" % "1.2")
triggeredMessage in ThisBuild := Watched.clearWhenTriggered
initialCommands in console := """
|import scala.concurrent.ExecutionContext.Implicits.global
|import scala.concurrent.Await
|import scala.concurrent.duration._
|import DatabaseSchema._
|val schema = Schema(slick.driver.H2Driver)
|import schema._, schema.profile.api._
|def exec[T](action: DBIO[T]): T = Await.result(db.run(action), 2 seconds)
|val db = Database.forConfig("clob-example")
|exec(populate)
""".trim.stripMargin