-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
executable file
·42 lines (35 loc) · 1.16 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
import scala.scalanative.build.*
import org.scalajs.linker.interface.ESVersion
ThisBuild / version := "0.2.16"
ThisBuild / organization := "be.adamv"
ThisBuild / scalaVersion := "3.4.2"
ThisBuild / javaOptions += "-Xss1G"
ThisBuild / javaOptions += "-Xmx8G"
lazy val root = crossProject(JSPlatform, JVMPlatform, NativePlatform).withoutSuffixFor(JVMPlatform)
.in(file("."))
.jvmSettings(
ThisBuild / fork := true,
libraryDependencies += "org.scalameta" %%% "munit" % "1.0.0-M10" % Test,
)
.settings(
name := "CZ2",
idePackagePrefix := Some("be.adamv"),
nativeConfig ~= {
_.withLTO(LTO.thin)
.withMode(Mode.releaseFull)
.withGC(GC.commix)
},
Compile / fullLinkJS / scalaJSLinkerConfig ~= { // set Global/scalaJSStage := FullOptStage
_.withESFeatures(_.withESVersion(ESVersion.ES2021))
.withClosureCompiler(true)
.withCheckIR(true)
},
jsEnv := {
import org.scalajs.jsenv.nodejs.NodeJSEnv
new NodeJSEnv(
NodeJSEnv.Config().withArgs(List("--stack-size=10000"))
)
},
scalaJSUseMainModuleInitializer := true
)
publishTo := Some(Resolver.file("local-ivy", file("~")))