-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
93 lines (75 loc) · 3.31 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
import com.typesafe.config.{ Config, ConfigFactory }
import scala.collection.JavaConverters._
name := """mono-list"""
organization := "com.example"
version := "1.0.0-SNAPSHOT"
lazy val root = (project in file(".")).enablePlugins(PlayScala)
scalaVersion := "2.11.11"
scalacOptions ++= Seq(
"-feature",
"-deprecation",
"-unchecked",
"-encoding",
"UTF-8",
"-Xfatal-warnings",
"-language:_",
// Warn if an argument list is modified to match the receiver
"-Ywarn-adapted-args",
// Warn about inaccessible types in method signatures.
"-Ywarn-inaccessible",
// Warn when a type argument is inferred to be `Any`.
"-Ywarn-infer-any",
// Warn when non-nullary `def f()' overrides nullary `def f'
"-Ywarn-nullary-override",
// Warn when nullary methods return Unit.
"-Ywarn-nullary-unit",
// Warn when numerics are widened.
"-Ywarn-numeric-widen"
)
libraryDependencies ++= Seq(
jdbc,
cache,
ws,
filters,
"org.scalatestplus.play" %% "scalatestplus-play" % "2.0.0" % Test,
"org.scalatest" %% "scalatest" % "3.0.1" % Test,
"org.scalikejdbc" %% "scalikejdbc" % "2.5.2",
"org.scalikejdbc" %% "scalikejdbc-jsr310" % "2.5.2",
"org.scalikejdbc" %% "scalikejdbc-config" % "2.5.2",
"org.scalikejdbc" %% "scalikejdbc-test" % "2.5.2" % Test,
"org.skinny-framework" %% "skinny-orm" % "2.3.7",
"org.scalikejdbc" %% "scalikejdbc-play-initializer" % "2.5.+",
"ch.qos.logback" % "logback-classic" % "1.2.3",
"com.adrianhurt" %% "play-bootstrap" % "1.1-P25-B3",
"com.github.t3hnar" %% "scala-bcrypt" % "3.0",
"jp.t2v" %% "play2-auth" % "0.14.2",
"jp.t2v" %% "play2-auth-test" % "0.14.2" % Test,
"jp.t2v" %% "play2-pager" % "0.1.0",
"jp.t2v" %% "play2-pager-scalikejdbc" % "0.1.0",
"mysql" % "mysql-connector-java" % "6.0.6",
"org.postgresql" % "postgresql" % "42.0.0",
"org.flywaydb" %% "flyway-play" % "3.1.0",
"com.github.j5ik2o" %% "scala-rakuten-item-search-api" % "1.0.3"
)
// Adds additional packages into Twirl
TwirlKeys.templateImports ++= Seq("forms._")
// Adds additional packages into conf/routes
// play.sbt.routes.RoutesKeys.routesImport += "com.example.binders._"
lazy val envConfig = settingKey[Config]("env-config")
envConfig := {
val env = sys.props.getOrElse("env", "dev")
ConfigFactory.parseFile(file("env") / (env + ".conf"))
}
flywayLocations := envConfig.value.getStringList("flywayLocations").asScala
flywayDriver := envConfig.value.getString("jdbcDriver")
flywayUrl := envConfig.value.getString("jdbcUrl")
flywayUser := envConfig.value.getString("jdbcUserName")
flywayPassword := envConfig.value.getString("jdbcPassword")
herokuJdkVersion in Compile := "1.8"
herokuAppName in Compile := "tofu-mono-list"
herokuProcessTypes in Compile := Map(
"web" -> s"target/universal/stage/bin/${normalizedName.value} -Dhttp.port=$$PORT -Dconfig.resource=prod/application.conf -Ddb.default.migration.auto=true"
)
herokuConfigVars in Compile := Map(
"JAVA_OPTS" -> "-Xmx512m -Xms512m"
)