-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.sbt
59 lines (51 loc) · 2.02 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
//loads the server project at sbt startup
onLoad in Global := (Command.process("project server", _: State)) compose (onLoad in Global).value
scalaVersion in ThisBuild := "2.12.2"
lazy val commonSettings = Seq(
version := "1.0-SNAPSHOT",
scalaVersion := "2.12.2"
)
val playJsonVersion = "2.6.7"
lazy val server = project.enablePlugins(PlayScala).settings(
commonSettings,
libraryDependencies ++= Seq(
ws,
guice,
"com.vmunier" %% "scalajs-scripts" % "1.1.0",
"org.webjars" %% "webjars-play" % "2.6.0-M1",
"org.webjars.bower" % "bulma" % "0.6.1",
"org.scalatestplus.play" %% "scalatestplus-play" % "3.0.0" % Test,
"org.jsoup" % "jsoup" % "1.10.2" % Test
),
scalaJSProjects := Seq(client),
pipelineStages in Assets := Seq(scalaJSPipeline),
compile in Compile := ((compile in Compile) dependsOn scalaJSPipeline).value
).dependsOn(sharedJvm)
lazy val shared = crossProject.crossType(CrossType.Pure).settings(
commonSettings,
libraryDependencies ++= Seq(
"com.lihaoyi" %%% "autowire" % "0.2.6",
"com.beachape" %%% "enumeratum" % "1.5.12",
"com.typesafe.play" %% "play-json" % playJsonVersion
)
).jsSettings(
libraryDependencies += "org.scala-js" %%% "scalajs-java-time" % "0.2.3"
)
.jsConfigure(_ enablePlugins ScalaJSWeb)
.enablePlugins(SbtTwirl)
.settings(
sourceDirectories in(Compile, TwirlKeys.compileTemplates) +=
(baseDirectory.value.getParentFile / "src" / "main" / "scala")
)
lazy val sharedJvm = shared.jvm
lazy val sharedJs = shared.js
lazy val client = project.enablePlugins(ScalaJSPlugin, ScalaJSWeb).configs(IntegrationTest).settings(
resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots",
libraryDependencies ++= Seq(
"org.scala-js" %%% "scalajs-dom" % "0.9.4",
"io.surfkit" %%% "scalajs-google-maps" % "0.0.3-SNAPSHOT",
"com.typesafe.play" %%% "play-json" % playJsonVersion,
"org.scala-js" %%% "scalajs-java-time" % "0.2.3",
"org.scalatest" %%% "scalatest" % "3.0.3" % Test
)
).dependsOn(sharedJs)