-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.sbt
68 lines (60 loc) · 2.19 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
ThisBuild / tlBaseVersion := "0.0"
ThisBuild / organization := "com.armanbilge"
ThisBuild / organizationName := "Arman Bilge"
ThisBuild / developers += tlGitHubDev("armanbilge", "Arman Bilge")
ThisBuild / startYear := Some(2023)
ThisBuild / crossScalaVersions := Seq("3.3.1")
ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec.temurin("17"))
ThisBuild / tlJdkRelease := Some(8)
ThisBuild / githubWorkflowBuildPreamble ++= Seq(
WorkflowStep.Use(
UseRef.Public("actions", "setup-node", "v4"),
name = Some("Setup NodeJS v20 LTS"),
params = Map("node-version" -> "20", "cache" -> "npm"),
cond = Some("matrix.project == 'rootJS'"),
),
WorkflowStep.Run(
List("npm install"),
cond = Some("matrix.project == 'rootJS'"),
),
)
ThisBuild / githubWorkflowBuildPreamble ++= nativeBrewInstallWorkflowSteps.value
ThisBuild / nativeBrewInstallCond := Some("matrix.project == 'rootNative'")
ThisBuild / Test / testOptions += Tests.Argument("+l")
lazy val root = tlCrossRootProject.aggregate(
core,
)
lazy val core = crossProject(JVMPlatform, JSPlatform, NativePlatform)
.in(file("core"))
.settings(
name := "porcupine",
libraryDependencies ++= Seq(
"org.typelevel" %%% "cats-core" % "2.9.0",
"org.typelevel" %%% "cats-effect" % "3.5.4",
"org.typelevel" %%% "cats-core" % "2.10.0",
"co.fs2" %%% "fs2-core" % "3.11.0",
"org.scodec" %%% "scodec-bits" % "1.1.38",
),
Test / test := (Test / run).toTask("").value,
Test / mainClass := Some("porcupine.PorcupineTest"),
)
.jvmSettings(
libraryDependencies ++= Seq(
"org.xerial" % "sqlite-jdbc" % "3.46.1.3",
),
fork := true,
)
.jsSettings(
Test / scalaJSUseMainModuleInitializer := true,
Test / scalaJSUseTestModuleInitializer := false,
Test / scalaJSLinkerConfig ~= (_.withModuleKind(ModuleKind.CommonJSModule)),
jsEnv := {
import org.scalajs.jsenv.nodejs.NodeJSEnv
new NodeJSEnv(NodeJSEnv.Config().withArgs(List("--enable-source-maps")))
},
)
.nativeConfigure(_.enablePlugins(ScalaNativeBrewedConfigPlugin))
.nativeSettings(
nativeBrewFormulas += "sqlite",
nativeConfig ~= { c => c.withLinkingOptions(c.linkingOptions :+ "-lsqlite3") },
)