-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sc
75 lines (64 loc) · 2.28 KB
/
build.sc
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
// build.sc
import mill._, scalalib._, scalajslib._
object jvm extends CrossSbtModule {
def ivyDeps = Agg(cfg.upickle, cfg.source) ++ cfg.akka
def crossScalaVersion = "2.12.8"
def platformSegment = "jvm"
def unmanagedClasspath = cfg.javafx
def sources = T.sources(
millSourcePath / platformSegment / "src" / "main",
millSourcePath / "shared" / "src" / "main"
)
}
object js extends CrossSbtModule with ScalaJSModule {
def ivyDeps = Agg(cfg.upickle, cfg.source, cfg.scalajsdom)
def crossScalaVersion = "2.12.8"
def platformSegment = "js"
def scalaJSVersion = "0.6.26"
def sources = T.sources(
millSourcePath / platformSegment / "src" / "main",
millSourcePath / "shared" / "src" / "main"
)
}
//object native extends CrossSbtModule with ScalaNative {
// def ivyDeps = Agg(cfg.upickle, cfg.source) ++ cfg.akka
// def crossScalaVersion = "2.12.8"
// def platformSegment = "jvm"
//
// def sources = T.sources(
// millSourcePath / platformSegment / "src" / "main",
// millSourcePath / "shared" / "src" / "main"
// )
//}
object server extends ScalaModule {
def scalaVersion = "2.12.8"
def sources = T.sources{ millSourcePath }
def ivyDeps = Agg(cfg.upickle, cfg.scalatags) ++ cfg.akka
}
object todofx extends ScalaModule {
def scalaVersion = "2.12.8"
def ivyDeps = Agg(cfg.check)
def moduleDeps = Seq(jvm)
def unmanagedClasspath = cfg.javafx
}
object todojs extends ScalaJSModule {
def scalaVersion = "2.12.8"
def scalaJSVersion = "0.6.26"
def ivyDeps = Agg(cfg.scalatags, cfg.upickle)
def moduleDeps = Seq(js)
}
object cfg {
val upickle = ivy"com.lihaoyi::upickle::0.7.1"
val scalatags = ivy"com.lihaoyi::scalatags::0.6.7"
val source = ivy"com.lihaoyi::sourcecode::0.1.4" // 0.1.5
val check = ivy"org.scalacheck::scalacheck::1.14.0"
val akka = Seq(ivy"com.typesafe.akka::akka-http::10.1.7",
ivy"com.typesafe.akka::akka-stream::2.5.20",
ivy"com.typesafe.akka::akka-actor::2.5.20")
val scalajsdom = ivy"org.scala-js::scalajs-dom::0.9.2"
// use a jvm version matching your openjfx version, currently needs 11
// sudo apt install openjfx
// apt show openjfx
val javafx = Agg.from(ammonite.ops.ls(os.Path("/usr/share/openjfx/lib/"))
.map(PathRef(_)))
}