-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
68 lines (59 loc) · 2.54 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
import sbt.Project.projectToRef
//import play.PlayImport.PlayKeys._
lazy val clients = Seq(exampleClient)
lazy val scalaV = "2.11.7"
//resolvers += "bintray/non" at "http://dl.bintray.com/non/maven"
lazy val exampleServer = (project in file("example-server")).settings(
scalaVersion := scalaV,
routesImport += "config.Routes._",
scalaJSProjects := clients,
pipelineStages := Seq(scalaJSProd, gzip),
resolvers += "scalaz-bintray" at "https://dl.bintray.com/scalaz/releases",
libraryDependencies ++= Seq(
filters,
jdbc,
evolutions,
"com.typesafe.play" %% "anorm" % "2.5.0",
"com.vmunier" %% "play-scalajs-scripts" % "0.3.0",
"com.typesafe.slick" %% "slick" % "3.0.2",
"com.typesafe.play" %% "play-slick" % "1.0.1",
"com.lihaoyi" %% "upickle" % "0.3.4",
"org.webjars" %% "webjars-play" % "2.4.0",
"org.webjars" % "bootstrap" % "3.3.5",
"org.webjars" % "jquery" % "2.1.4",
"org.webjars" % "font-awesome" % "4.4.0",
"org.specs2" %% "specs2-core" % "3.7" % "test",
"org.scalactic" %% "scalactic" % "2.2.6",
"org.scalatest" %% "scalatest" % "2.2.6" % "test"
)
).enablePlugins(PlayScala).
aggregate(clients.map(projectToRef): _*).
dependsOn(exampleSharedJvm)
lazy val exampleClient = (project in file("example-client")).settings(
scalaVersion := scalaV,
persistLauncher := true,
persistLauncher in Test := false,
libraryDependencies ++= Seq(
"org.scala-js" %%% "scalajs-dom" % "0.8.1",
"com.lihaoyi" %%% "scalatags" % "0.5.2",
"com.lihaoyi" %%% "scalarx" % "0.2.8",
"be.doeraene" %%% "scalajs-jquery" % "0.8.0",
"com.lihaoyi" %%% "upickle" % "0.3.4",
"org.specs2" %% "specs2-core" % "3.7" % "test",
"org.scalactic" %% "scalactic" % "2.2.6",
"org.scalatest" %% "scalatest" % "2.2.6" % "test"
)
).enablePlugins(ScalaJSPlugin, ScalaJSPlay).
dependsOn(exampleSharedJs)
scalacOptions in Test ++= Seq("-Yrangepos")
lazy val exampleShared = (crossProject.crossType(CrossType.Pure) in file("example-shared")).
settings(scalaVersion := scalaV).
jsConfigure(_ enablePlugins ScalaJSPlay)
lazy val exampleSharedJvm = exampleShared.jvm
lazy val exampleSharedJs = exampleShared.js
// loads the jvm project at sbt startup
onLoad in Global := (Command.process("project exampleServer", _: State)) compose (onLoad in Global).value
// for Eclipse users
EclipseKeys.skipParents in ThisBuild := false
// Compile the project before generating Eclipse files, so that generated .scala or .class files for views and routes are present
EclipseKeys.preTasks := Seq(compile in (exampleServer, Compile))