-
Notifications
You must be signed in to change notification settings - Fork 17
/
build.sbt
105 lines (94 loc) · 3.56 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
ThisBuild / tlBaseVersion := "0.13" // your current series x.y
ThisBuild / organization := "io.github.timwspence"
ThisBuild / organizationName := "TimWSpence"
ThisBuild / organizationHomepage := Some(url("https://github.com/TimWSpence"))
ThisBuild / licenses := Seq(License.Apache2)
ThisBuild / developers := List(
tlGitHubDev("TimWSpence", "Tim Spence")
)
ThisBuild / startYear := Some(2017)
ThisBuild / tlSonatypeUseLegacyHost := false
val Scala213 = "2.13.15"
ThisBuild / crossScalaVersions := Seq(Scala213, "2.12.20", "3.4.1")
ThisBuild / scalaVersion := Scala213 // the default Scala
ThisBuild / tlJdkRelease := Some(8)
val CatsVersion = "2.10.0"
val CatsEffectVersion = "3.5.5"
val DisciplineVersion = "2.0.0"
val ScalaCheckVersion = "1.17.1"
val MunitVersion = "1.0.0-M11"
val MunitCatsEffectVersion = "2.0.0"
val ScalacheckEffectVersion = "2.0.0-M2"
lazy val `cats-stm` = tlCrossRootProject
.aggregate(
core,
benchmarks,
docs,
examples,
laws,
unidocs
)
lazy val core = crossProject(JVMPlatform, JSPlatform, NativePlatform)
.in(file("core"))
.settings(
name := "cats-stm",
libraryDependencies ++= Seq(
"org.typelevel" %%% "cats-effect" % CatsEffectVersion,
"org.typelevel" %%% "cats-core" % CatsVersion,
"org.scalacheck" %%% "scalacheck" % ScalaCheckVersion % Test,
"org.scalameta" %%% "munit" % MunitVersion % Test,
"org.scalameta" %%% "munit-scalacheck" % MunitVersion % Test,
"org.typelevel" %%% "scalacheck-effect-munit" % ScalacheckEffectVersion % Test,
"org.typelevel" %%% "munit-cats-effect" % MunitCatsEffectVersion % Test
)
)
.nativeSettings(
tlVersionIntroduced := List("2.12", "2.13", "3").map(_ -> "0.13.2").toMap
)
.settings(console / initialCommands := """
import cats._
import cats.implicits._
import cats.effect._
import cats.effect.implicits._
import cats.effect.unsafe.implicits.global
""")
lazy val laws = project
.in(file("laws"))
.settings(
libraryDependencies ++= Seq(
"org.scalacheck" %%% "scalacheck" % ScalaCheckVersion % Test,
"org.scalameta" %%% "munit" % MunitVersion % Test,
"org.scalameta" %%% "munit-scalacheck" % MunitVersion % Test,
"org.typelevel" %%% "scalacheck-effect-munit" % ScalacheckEffectVersion % Test,
"org.typelevel" %%% "munit-cats-effect" % MunitCatsEffectVersion % Test,
"org.typelevel" %%% "cats-laws" % CatsVersion % Test,
"org.typelevel" %%% "discipline-munit" % DisciplineVersion % Test
)
)
//TODO cross-build this
.dependsOn(core.jvm)
.enablePlugins(NoPublishPlugin)
lazy val benchmarks = project
.in(file("benchmarks"))
.dependsOn(core.jvm)
.enablePlugins(NoPublishPlugin, JmhPlugin)
lazy val docs = project
.in(file("site"))
.settings(
laikaConfig ~= { _.withRawContent },
tlSiteIsTypelevelProject := Some(TypelevelProject.Affiliate)
)
.enablePlugins(TypelevelSitePlugin)
//TODO cross-build this
.dependsOn(core.jvm)
lazy val unidocs = project
.in(file("unidoc"))
.enablePlugins(TypelevelUnidocPlugin) // also enables the ScalaUnidocPlugin
.settings(
name := "cats-stm-docs",
ScalaUnidoc / unidoc / unidocProjectFilter := inProjects(core.jvm)
)
lazy val examples = crossProject(JVMPlatform, JSPlatform)
.in(file("examples"))
.dependsOn(core)
.enablePlugins(NoPublishPlugin)