-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
65 lines (53 loc) · 1.98 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import org.scalatra.sbt._
import org.scalatra.sbt.PluginKeys._
import ScalateKeys._
val ScalatraVersion = "2.5.0"
val Json4sVersion = "3.5.0"
val AkkaVersion = "2.4.17"
val PostgresVersion = "42.0.0"
val SlickVersion = "3.2.0"
val ScalaTestVersion = "3.0.1"
ScalatraPlugin.scalatraSettings
flywayUrl := sys.env.getOrElse("POSTGRES_JDBC_URL", default = "jdbc:postgresql://localhost:5432/slick")
flywayUser := sys.env.getOrElse("POSTGRES_USER", default = "slick")
flywayPassword := sys.env.getOrElse("POSTGRES_PASSWORD", default = "slick")
scalateSettings
organization := "io.slick"
name := "one"
version := "0.0.1-SNAPSHOT"
scalaVersion := "2.12.1"
resolvers += Classpaths.typesafeReleases
resolvers += Resolver.jcenterRepo
libraryDependencies ++= Seq(
"org.flywaydb" % "flyway-core" % "4.1.1",
"org.postgresql" % "postgresql" % PostgresVersion,
"org.json4s" %% "json4s-jackson" % Json4sVersion,
"org.json4s" %% "json4s-ext" % Json4sVersion,
"org.scalactic" %% "scalactic" % ScalaTestVersion,
"org.scalatest" %% "scalatest" % ScalaTestVersion % "test",
"ch.qos.logback" % "logback-classic" % "1.2.1" % "runtime",
"com.github.tminglei" %% "slick-pg" % "0.15.0-RC",
"com.typesafe.akka" %% "akka-actor" % AkkaVersion,
"com.typesafe" % "config" % "1.3.1",
"com.typesafe.scala-logging" %% "scala-logging" % "3.5.0",
"com.typesafe.slick" %% "slick" % SlickVersion,
"com.typesafe.slick" %% "slick-hikaricp" % SlickVersion
)
// For debugging in IntelliJ IDEA
javaOptions ++= Seq(
"-Xdebug",
"-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005"
)
scalateTemplateConfig in Compile := {
val base = (sourceDirectory in Compile).value
Seq(
TemplateConfig(
base / "webapp" / "WEB-INF" / "templates",
Seq.empty, /* default imports should be added here */
Seq(
Binding("context", "_root_.org.scalatra.scalate.ScalatraRenderContext", importMembers = true, isImplicit = true)
), /* add extra bindings here */
Some("templates")
)
)
}