-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sbt
75 lines (68 loc) · 2.69 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
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
import org.scalajs.linker.interface.ModuleSplitStyle
import xerial.sbt.Sonatype._
val zioVersion = "2.0.21"
val javaTimeVersion = "2.5.0"
val commonSettings = Seq(
ThisBuild / sonatypeCredentialHost := sonatypeCentralHost,
sonatypeProfileName := "io.github.jypma",
publishMavenStyle := true,
licenses := Seq("APL2" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt")),
sonatypeProjectHosting := Some(GitHubHosting("jypma", "lazagna", "[email protected]")),
ThisBuild / organization := "io.github.jypma",
ThisBuild / organizationName := "Jan Ypma",
ThisBuild / organizationHomepage := Some(url("http://github.com/jypma")),
ThisBuild / versionScheme := Some("early-semver"),
ThisBuild / version := "0.10.1",
scalaVersion := "3.3.3",
scalacOptions ++= Seq(
"-Wunused:imports",
"-feature",
"-deprecation",
"-language:implicitConversions"
),
semanticdbEnabled := true,
semanticdbVersion := scalafixSemanticdb.revision,
testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework"),
// (optional) If you need scalapb/scalapb.proto or anything from
// google/protobuf/*.proto
libraryDependencies ++= Seq(
"dev.zio" %%% "zio" % zioVersion,
"dev.zio" %%% "zio-streams" % zioVersion,
"dev.zio" %%% "zio-test" % zioVersion % Test,
"dev.zio" %%% "zio-test-sbt" % zioVersion % Test,
"dev.zio" %%% "zio-test-magnolia" % zioVersion % Test
))
lazy val core = crossProject(JSPlatform, JVMPlatform).in(file("core"))
.settings(commonSettings)
.settings(
name := "lazagna-core",
publishTo := sonatypePublishToBundle.value
)
.jsSettings(
/* Configure Scala.js to emit modules in the optimal way to
* connect to Vite's incremental reload.
* - emit ECMAScript modules
* - emit as many small modules as possible for classes in the "draw" package
* - emit as few (large) modules as possible for all other classes
* (in particular, for the standard library)
*/
scalaJSLinkerConfig ~= {
_.withModuleKind(ModuleKind.ESModule)
.withModuleSplitStyle(
ModuleSplitStyle.SmallModulesFor(List("draw", "zio.lazagna")))
},
Test / jsEnv := new jsenv.playwright.PWEnv(
browserName = "chrome",
headless = true,
showLogs = true
),
// Below was added when testing playwright. Seems not needed.
//scalaJSUseMainModuleInitializer := true,
//Test / fork := false,
Test / parallelExecution := false, // We only have one DOM in playwright.
libraryDependencies ++= Seq(
"org.scala-js" %%% "scalajs-dom" % "2.4.0",
"io.github.cquiroz" %%% "scala-java-time" % javaTimeVersion,
"io.github.cquiroz" %%% "scala-java-time-tzdb" % javaTimeVersion,
),
)