-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathbuild.sbt
More file actions
92 lines (82 loc) · 2.99 KB
/
Copy pathbuild.sbt
File metadata and controls
92 lines (82 loc) · 2.99 KB
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
val scala3Version = "3.9.0"
val scalaVersions = Seq(scala3Version)
// dependencies for tests and benchmarks
val catsVersion = "2.13.0"
val catsMtlVersion = "1.7.0"
val zioPreludeVersion = "1.0.0-RC48"
val kyoVersion = "1.0.0-RC6"
val turboliftVersion = "0.128.0"
val zioVersion = "2.1.24"
val munitVersion = "1.3.6"
scalaVersion := scala3Version
organization := "com.github.ghostdogpr"
homepage := Some(url("https://github.com/ghostdogpr/purelogic"))
licenses := List(License.Apache2)
scmInfo := Some(ScmInfo(url("https://github.com/ghostdogpr/purelogic/"), "scm:git:git@github.com:ghostdogpr/purelogic.git"))
developers := List(Developer("ghostdogpr", "Pierre Ricadat", "ghostdogpr@gmail.com", url("https://github.com/ghostdogpr")))
resolvers += Resolver.sonatypeCentralSnapshots
addCommandAlias("fmt", "all scalafmtSbt scalafmt Test/scalafmt")
addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck Test/scalafmtCheck")
// sbt-ci-release uses these keys, but sbt 2's lintUnused check flags them as unused.
Global / excludeLintKeys ++= Set(
scmInfo
)
lazy val root = project
.in(file("."))
.settings(publish / skip := true)
.aggregate(core.projectRefs *)
.aggregate(examples, benchmarks)
lazy val core = (projectMatrix in file("core"))
.settings(name := "purelogic")
.settings(commonSettings)
.settings(
libraryDependencies ++= Seq(
"org.scalameta" %% "munit" % munitVersion % Test
)
)
.jvmPlatform(scalaVersions)
.jsPlatform(scalaVersions, Seq(Test / fork := false))
.nativePlatform(scalaVersions, Seq(Test / fork := false, bspEnabled := false))
lazy val coreJVM = core.jvm(scala3Version)
lazy val examples = project
.in(file("examples"))
.settings(name := "purelogic-examples")
.settings(commonSettings)
.settings(publish / skip := true)
.settings(run / fork := true)
.dependsOn(coreJVM)
lazy val benchmarks = project
.in(file("benchmarks"))
.enablePlugins(JmhPlugin)
.settings(name := "purelogic-benchmarks")
.settings(commonSettings)
.settings(scalaVersion := "3.9.0")
.settings(
scalacOptions := scalacOptions.value
.filterNot(_ == "-Ykind-projector")
.filterNot(_ == "-Xfatal-warnings")
.filterNot(_ == "-language:experimental.captureChecking") :+ "-Xkind-projector"
)
.settings(publish / skip := true)
.settings(
libraryDependencies ++= Seq(
"dev.zio" %% "zio-prelude" % zioPreludeVersion,
"org.typelevel" %% "cats-core" % catsVersion,
"org.typelevel" %% "cats-mtl" % catsMtlVersion,
"io.getkyo" %% "kyo-core" % kyoVersion,
"io.github.marcinzh" %% "turbolift-core" % turboliftVersion
)
)
.dependsOn(coreJVM)
lazy val commonSettings = Def.settings(
scalacOptions ++= Seq(
"-deprecation",
"-Werror",
"-no-indent",
"-Wunused:imports,params,privates,implicits,explicits",
"-Wvalue-discard",
"-Xkind-projector",
"-language:experimental.captureChecking"
),
Test / fork := true
)