blob: 62cfe3ce7c212f0acee04a62ba4c51a807e67c14 (
plain) (
blame)
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
|
import mill._, scalalib._, scalajslib._, scalanativelib._, scalafmt._
trait Shared extends ScalaModule with ScalafmtModule{
def sharedSources = T.sources(build.millSourcePath / "shared")
def sources = T.sources(
super.sources() ++ sharedSources()
)
def ivyDeps = Agg(
ivy"io.crashbox::spray-json::1.3.5-6",
ivy"com.lihaoyi::scalatags::0.7.0"
)
}
object server extends ScalaModule with Shared {
def scalaVersion = "2.13.1"
def ivyDeps = T {
super.ivyDeps() ++ Agg(
ivy"com.typesafe.akka::akka-stream:2.5.25",
ivy"com.typesafe.akka::akka-http:10.1.10",
ivy"com.typesafe.akka::akka-http-spray-json:10.1.10",
ivy"com.typesafe.slick::slick:3.3.2",
ivy"org.slf4j:slf4j-nop:1.6.4",
ivy"org.xerial:sqlite-jdbc:3.28.0"
)
}
// This includes the resulting javascript file so that it can be served
// as a classpath resource and is packaged in the final jar.
def localClasspath = T{
super.localClasspath() :+ PathRef(ui.fastOpt().path / os.up)
}
}
object ui extends ScalaJSModule with Shared {
def scalaVersion = "2.13.1"
def scalaJSVersion = "0.6.29"
def ivyDeps = T {
super.ivyDeps() ++ Agg(
ivy"org.scala-js::scalajs-dom::0.9.7",
ivy"org.scala-js::scalajs-java-time::0.2.5"
)
}
}
object client extends ScalaNativeModule with Shared {
import scalanativelib.api.ReleaseMode
def scalaVersion = "2.11.12"
def scalaNativeVersion = "0.3.8"
def releaseMode = ReleaseMode.Debug
def ivyDeps = T {
super.ivyDeps() ++ Agg(
ivy"io.crashbox::commando::0.1.2"
)
}
}
def dist = T {
server.assembly()
client.nativeLink()
}
|