-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.sbt
103 lines (79 loc) · 2.9 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
94
95
96
97
98
99
100
101
102
103
import NativePackagerHelper._
val commonSettings = Seq(
organization := "it.codingjam",
version := "0.0.1",
scalaVersion := "2.11.8")
resolvers ++= Seq(
"openImaJ repo" at "http://maven.openimaj.org",
"Semantic Desktop" at "http://aperture.sourceforge.net/maven"
)
lazy val root = (project in file("."))
.settings(
name := """la-gioconda"""
)
.aggregate(common, frontend)
lazy val common = (project in file("common"))
.enablePlugins(BuildInfoPlugin)
.settings(
name := "common",
resolvers ++= Seq(
"openImaJ repo" at "http://maven.openimaj.org",
"Semantic Desktop" at "http://aperture.sourceforge.net/maven"
),
libraryDependencies ++= Dependencies.openimaj ++ Dependencies.common ++ Dependencies.logging ++ Dependencies.circe,
commonSettings
)
lazy val backend = (project in file("backend"))
.settings(
name := "backend",
fork in run := true,
javaOptions ++= Seq(
"-Djava.library.path=" + (baseDirectory.value.getParentFile / "backend" / "sigar" ).getAbsolutePath,
"-Xms128m", "-Xmx128m"),
libraryDependencies ++= (Dependencies.common),
commonSettings
).dependsOn(common)
lazy val frontend = (project in file("frontend"))
.enablePlugins(PlayScala, BuildInfoPlugin, JavaAppPackaging)
.settings(
name := "frontend",
routesGenerator := InjectedRoutesGenerator,
libraryDependencies ++= (Dependencies.frontend ++ Seq(filters, cache)),
javaOptions ++= Seq(
"-Djava.library.path=" + (baseDirectory.value.getParentFile / "backend" / "sigar" ).getAbsolutePath,
"-Xms128m", "-Xmx1024m"),
fork in run := true,
mappings in Universal ++= directory(baseDirectory.value.getParentFile / "backend" / "sigar"),
bashScriptExtraDefines ++= Seq(
"""declare -r sigar_dir="$(realpath "${app_home}/../sigar")"""",
"""addJava "-Djava.library.path=${sigar_dir}""""
),
commonSettings
).dependsOn(common)
scalaVersion := "2.11.7"
libraryDependencies ++= Seq(
jdbc,
cache,
ws,
"org.scalatestplus.play" %% "scalatestplus-play" % "1.5.1" % Test
)
libraryDependencies ++= Seq(
"ch.qos.logback" % "logback-classic" % "1.1.3"
)
//compile in Compile <<= (compile in Compile).dependsOn(scalafmt)
javaOptions ++= Seq("-Xmx4g")
PlayKeys.externalizeResources := false
routesGenerator := InjectedRoutesGenerator
scalacOptions in ThisBuild ++= Seq(
"-target:jvm-1.8",
"-encoding", "UTF-8",
"-deprecation", // warning and location for usages of deprecated APIs
"-feature", // warning and location for usages of features that should be imported explicitly
"-unchecked", // additional warnings where generated code depends on assumptions
"-Xlint", // recommended additional warnings
"-Ywarn-adapted-args", // Warn if an argument list is modified to match the receiver
"-Ywarn-value-discard", // Warn when non-Unit expression results are unused
"-Ywarn-inaccessible",
"-Ywarn-dead-code"
)
fork in run := true