-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sc
70 lines (59 loc) · 1.41 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
import $ivy.`com.lihaoyi::mill-contrib-bloop:$MILL_VERSION`
import mill._
import mill.scalalib._
import mill.scalajslib._
import mill.scalajslib.api._
import $ivy.`io.indigoengine::mill-indigo:0.17.0`, millindigo._
object snakeIn5Minutes extends ScalaJSModule with MillIndigo {
def scalaVersion = "3.5.0"
def scalaJSVersion = "1.17.0"
def buildGame() =
T.command {
T {
compile()
fastLinkJS()
indigoBuild()()
}
}
def buildGameFull() =
T.command {
T {
compile()
fullLinkJS()
indigoBuildFull()()
}
}
def runGame() =
T.command {
T {
compile()
fastLinkJS()
indigoRun()()
}
}
def runGameFull() =
T.command {
T {
compile()
fullLinkJS()
indigoRunFull()()
}
}
val indigoVersion = "0.17.0"
val indigoOptions: IndigoOptions =
IndigoOptions.defaults
.withTitle("Snake in 5 minutes - Made with Indigo")
.withWindowSize(400, 400)
.withBackgroundColor("black")
.withAssetDirectory(os.RelPath.rel / "assets")
.excludeAssets {
case p if p.endsWith(os.RelPath.rel / ".gitkeep") => true
case _ => false
}
val indigoGenerators: IndigoGenerators =
IndigoGenerators.None
def ivyDeps =
Agg(
ivy"io.indigoengine::indigo::$indigoVersion"
)
}