-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sc
77 lines (62 loc) · 2.07 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
76
77
import com.goyeau.mill.scalafix.ScalafixModule
import mill._
import mill.scalajslib._
import mill.scalajslib.api._
import mill.scalalib._
import millindigo._
import $ivy.`com.goyeau::mill-scalafix::0.3.1`
import $ivy.`io.indigoengine::mill-indigo:0.15.2`
object app extends ScalaJSModule with MillIndigo with ScalafixModule {
def scalaVersion = "3.3.0"
def scalaJSVersion = "1.14.0"
val indigoOptions: IndigoOptions = IndigoOptions
.defaults
.withTitle("Scalatris")
.withWindowWidth(720)
.withWindowHeight(500)
.cursorVisible
.electronLimitsFrameRate
.withElectronInstallType(ElectronInstall.Global)
.withBackgroundColor("black")
.withAssetDirectory(os.RelPath.rel / "assets")
val indigoGenerators: IndigoGenerators = IndigoGenerators("nns.scalatris")
.listAssets("Assets", indigoOptions.assets)
.generateConfig("DefaultConfig", indigoOptions)
def buildGame() = T.command {
T {
compile()
fastLinkJS()
indigoBuild()()
}
}
def runGame() = T.command {
T {
compile()
fastLinkJS()
indigoRun()()
}
}
val indigoVersion = "0.15.2"
val catsVersion = "2.10.0"
val mouseVersion = "1.2.2"
val wartremoverVersion = "3.1.5"
override def compileIvyDeps: T[Agg[Dep]] = Agg(ivy"org.wartremover::wartremover:$wartremoverVersion")
override def scalacPluginIvyDeps: Target[Agg[Dep]] = Agg(ivy"org.wartremover::wartremover:$wartremoverVersion")
override def scalacOptions: Target[Seq[String]] = Seq(
"-P:wartremover:traverser:org.wartremover.warts.Unsafe",
"-P:wartremover:traverser:org.wartremover.warts.PublicInference",
)
def ivyDeps = Agg(
ivy"io.indigoengine::indigo::$indigoVersion",
ivy"io.indigoengine::indigo-extras::$indigoVersion",
ivy"io.indigoengine::indigo-json-circe::$indigoVersion",
ivy"org.typelevel::cats-core::$catsVersion",
ivy"org.typelevel::mouse::$mouseVersion",
)
object test extends ScalaJSTests with TestModule.Munit {
val munitVersion = "0.7.29"
def ivyDeps = Agg(
ivy"org.scalameta::munit::$munitVersion",
)
}
}