This repository has been archived by the owner on Oct 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sbt
54 lines (43 loc) · 1.75 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
name := "mediamur"
version := "0.1"
scalaVersion := "2.12.7"
enablePlugins(JavaAppPackaging)
maintainer := "[email protected]"
val akkaHttpVersion = "10.1.10"
val akkaVersion = "2.6.0"
val twitter4JVersion = "4.0.7"
libraryDependencies ++= Seq(
"com.typesafe.akka" %% "akka-http" % akkaHttpVersion,
"com.typesafe.akka" %% "akka-http-testkit" % akkaHttpVersion % Test,
"com.typesafe.akka" %% "akka-http-spray-json" % akkaHttpVersion
)
libraryDependencies ++= Seq(
"com.typesafe.akka" %% "akka-stream" % akkaVersion,
"com.typesafe.akka" %% "akka-stream-testkit" % akkaVersion % Test,
"com.typesafe.akka" %% "akka-actor" % akkaVersion
)
libraryDependencies ++= Seq(
"org.twitter4j" % "twitter4j-core" % twitter4JVersion,
"org.twitter4j" % "twitter4j-stream" % twitter4JVersion,
"org.twitter4j" % "twitter4j-async" % twitter4JVersion
)
libraryDependencies += "com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.9.7"
mainClass in assembly := Some("fr.totetmatt.mediamur.Mediamur")
mainClass in Compile := Some("fr.totetmatt.mediamur.Mediamur")
name in Universal := name.value
// removes all jar mappings in universal and appends the fat jar
mappings in Universal := {
val universalMappings = (mappings in Universal).value
val fatJar = (assembly in Compile).value
val filtered = universalMappings filter {
case (file, name) => ! name.endsWith(".jar")
}
filtered :+ (fatJar -> ("lib/" + fatJar.getName))
}
scriptClasspath := Seq( (assemblyJarName in assembly).value )
// the bash scripts classpath only needs the fat jar
mappings in Universal += file("./conf/application.conf.default") -> "application.conf"
mappings in Universal += file("README.md") -> "README.md"
javaOptions in Universal ++= Seq(
"-Dconfig.file=application.conf"
)