-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
60 lines (45 loc) · 2.25 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
name := "slack-lunch-bot"
organization := "com.mintbeans"
version := "0.1-SNAPSHOT"
scalaVersion := "2.11.7"
javacOptions ++= Seq("-source", "1.8", "-target", "1.8", "-Xlint")
scalacOptions ++= Seq("-feature", "-unchecked", "-deprecation", "-encoding", "utf8", "-language", "postfixOps")
initialize := {
val _ = initialize.value
if (sys.props("java.specification.version") != "1.8")
sys.error("Java 8 is required for this project.")
}
mainClass in Compile := Some("com.mintbeans.lunchbot.Main")
resolvers ++= Seq(
"Sonatype Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/",
"Sonatype Releases" at "http://oss.sonatype.org/content/repositories/releases",
"Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/"
)
libraryDependencies ++= {
val akkaVersion = "2.3.12"
Seq(
"com.typesafe" % "config" % "1.2.1",
"com.restfb" % "restfb" % "1.13.0",
"com.flyberrycapital" %% "scala-slack" % "0.2.0",
"ch.qos.logback" % "logback-classic" % "1.1.1",
"com.typesafe.akka" %% "akka-actor" % akkaVersion,
"com.typesafe.akka" %% "akka-slf4j" % akkaVersion,
"com.typesafe.akka" %% "akka-testkit" % akkaVersion % "test",
"com.enragedginger" %% "akka-quartz-scheduler" % "1.4.0-akka-2.3.x",
"junit" % "junit" % "4.12" % "test",
"org.scalatest" %% "scalatest" % "2.2.5" % "test"
)
}
enablePlugins(JavaAppPackaging)
mappings in Universal <+= (packageBin in Compile, sourceDirectory ) map { (_, src) =>
src / "main" / "resources" / "reference.conf" -> "conf/application.conf.example"
}
mappings in Universal <+= (packageBin in Compile, sourceDirectory ) map { (_, src) =>
src / "main" / "resources" / "logback.xml" -> "conf/logback.xml"
}
javaOptions in Universal ++= Seq(
"-J-Xmx64m",
"-J-Xms64m"
)
bashScriptExtraDefines += """addJava "-Dconfig.file=${app_home}/../conf/application.conf""""
bashScriptExtraDefines += """addJava "-Dlogback.configurationFile=${app_home}/../conf/logback.xml""""