forked from hussachai/play-scalajs-showcase
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
94 lines (86 loc) · 3.97 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
import org.scalajs.sbtplugin.ScalaJSCrossVersion
import sbtcrossproject.CrossPlugin.autoImport.{CrossType, crossProject}
lazy val scalaV = "2.13.7"
lazy val exampleMultitier = (crossProject(JSPlatform, JVMPlatform).crossType(CrossType.Pure) in file("example-multitier")).
settings(
scalaVersion := scalaV,
scalacOptions += "-Ymacro-annotations",
resolvers += "jitpack" at "https://jitpack.io",
libraryDependencies ++= Seq(
"io.github.scala-loci" %%% "scala-loci-language" % "0.5.0" % "compile-internal",
"io.github.scala-loci" %%% "scala-loci-language-runtime" % "0.5.0",
"io.github.scala-loci" %%% "scala-loci-serializer-upickle" % "0.5.0",
"io.github.scala-loci" %%% "scala-loci-communicator-ws-akka-play" % "0.5.0",
"io.github.scala-loci" %%% "scala-loci-communicator-ws-webnative" % "0.5.0",
"io.github.scala-loci" %%% "scala-loci-language-transmitter-rescala" % "0.5.0",
"io.github.scala-loci.case-study-play-scalajs" % "org.querki.jquery-facade" % "2.0" cross ScalaJSCrossVersion.binary,
// "com.lihaoyi" %%% "scalarx" % "0.4.3",
"com.lihaoyi" % "scalatags" % "0.11.0" cross ScalaJSCrossVersion.binary,
"org.scala-js" % "scalajs-dom" % "2.0.0" cross ScalaJSCrossVersion.binary,
"com.typesafe.play" %% "play" % "2.8.11",
"com.typesafe.akka" %% "akka-http" % "10.2.7",
"com.typesafe.akka" %% "akka-stream" % "2.6.17"
)
)
lazy val exampleMultitierJvm = exampleMultitier.jvm
lazy val exampleMultitierJs = exampleMultitier.js
lazy val exampleServer = (project in file("example-server")).settings(
scalaVersion := scalaV,
scalaJSProjects := Seq(exampleClient),
Assets / pipelineStages := Seq(scalaJSPipeline),
testFrameworks += new TestFramework("utest.runner.Framework"),
libraryDependencies ++= Seq(
filters,
jdbc,
evolutions,
guice,
"org.apache.tinkerpop" % "tinkergraph-gremlin" % "3.5.1",
"com.michaelpollmeier" %% "gremlin-scala" % "3.4.7.17",
"org.playframework.anorm" %% "anorm" % "2.6.10",
"com.vmunier" %% "scalajs-scripts" % "1.2.0",
"com.h2database" % "h2" % "2.0.202",
"com.typesafe.slick" %% "slick" % "3.3.3",
"com.typesafe.play" %% "play-slick" % "5.0.0",
"com.lihaoyi" %% "upickle" % "1.4.2",
"org.webjars" %% "webjars-play" % "2.8.8-1",
"org.webjars" % "bootstrap" % "3.4.1",
"org.webjars" % "jquery" % "3.6.0",
"com.lihaoyi" %% "utest" % "0.7.10" % "test",
"com.typesafe.play" %% "play-specs2" % "2.8.11" % "test",
"com.typesafe.akka" %% "akka-http" % "10.2.7",
"com.typesafe.akka" %% "akka-stream" % "2.6.17"
)
).enablePlugins(PlayScala).
aggregate(exampleClient).
dependsOn(exampleSharedJvm, exampleMultitierJvm)
lazy val exampleClient = (project in file("example-client")).settings(
scalaVersion := scalaV,
testFrameworks += new TestFramework("utest.runner.Framework"),
libraryDependencies ++= Seq(
"org.scala-js" %%% "scalajs-dom" % "2.0.0",
"com.lihaoyi" %%% "scalatags" % "0.11.0",
"io.github.scala-loci.case-study-play-scalajs" %%% "org.querki.jquery-facade" % "2.0",
// "com.lihaoyi" %%% "scalarx" % "0.4.3",
"com.lihaoyi" %%% "upickle" % "1.4.2",
"com.lihaoyi" %%% "utest" % "0.7.10" % "test"
)
).enablePlugins(ScalaJSPlugin, ScalaJSWeb).
dependsOn(exampleSharedJs, exampleMultitierJs)
val exampleShared = (crossProject(JSPlatform, JVMPlatform).crossType(CrossType.Pure) in file("example-shared")).
settings(
scalaVersion := scalaV,
testFrameworks += new TestFramework("utest.runner.Framework"),
libraryDependencies ++= Seq(
"com.lihaoyi" %%% "upickle" % "1.4.2",
"com.lihaoyi" %%% "utest" % "0.7.10" % "test"
)
).
jvmSettings(
libraryDependencies ++= Seq(
"com.typesafe.play" %% "play-specs2" % "2.8.11" % "test"
)
)
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