-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
105 lines (96 loc) · 2.71 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
import Settings._
val Scala213 = "2.13.10"
val Scala212 = "2.12.20"
val Scala3 = "3.3.4"
val scalas = Seq(Scala212, Scala213, Scala3)
val CE3_Version = "3.4.8"
val CE2_Version = "2.5.5"
lazy val core = projectMatrix
.in(file("core"))
.defaultAxes(
CatsEffect3Axis,
VirtualAxis.jvm,
VirtualAxis.scalaABIVersion(Scala213)
)
.customRow(
scalaVersions = scalas,
axisValues = Seq(CatsEffect2Axis, VirtualAxis.jvm),
identity[Project] _
)
.customRow(
scalaVersions = scalas,
axisValues = Seq(CatsEffect3Axis, VirtualAxis.jvm),
identity[Project] _
)
.settings(
libraryDependencies += {
if (virtualAxes.value.contains(CatsEffect3Axis))
"org.typelevel" %% "cats-effect" % CE3_Version
else "org.typelevel" %% "cats-effect" % CE2_Version
},
libraryDependencies += "org.scalameta" %% "mdoc" % "2.3.6" % "provided"
)
.settings(moduleName := {
if (virtualAxes.value.contains(CatsEffect3Axis)) "mdoc-effect-ce3"
else "mdoc-effect-ce2"
})
lazy val core_CE2 = core.finder(CatsEffect2Axis)(Scala213)
lazy val core_CE3 = core.finder(CatsEffect3Axis)(Scala213)
lazy val docs = project
.in(file("docs"))
.settings(scalaVersion := Scala213)
.enablePlugins(SubatomicPlugin)
.settings(
publish / skip := true,
subatomicDependencies ++= Seq(
Subatomic.path(
(core_CE2 / Compile / target).value / "classes",
"cats-effect-2"
),
Subatomic.paths(
(core_CE2 / Compile / resourceDirectories).value,
"cats-effect-2"
),
Subatomic.dependency(
"org.typelevel" %% "cats-effect" % CE2_Version,
"cats-effect-2"
),
Subatomic.path(
(core_CE3 / Compile / target).value / "classes",
"cats-effect-3"
),
Subatomic.paths(
(core_CE3 / Compile / resourceDirectories).value,
"cats-effect-3"
),
Subatomic.dependency(
"org.typelevel" %% "cats-effect" % CE3_Version,
"cats-effect-3"
)
),
watchSources += WatchSource(
(ThisBuild / baseDirectory).value / "docs" / "pages"
),
Compile / unmanagedSourceDirectories +=
(ThisBuild / baseDirectory).value / "docs"
)
inThisBuild(
Seq(
resolvers += Resolver.sonatypeRepo("snapshots"),
organization := "com.indoorvivants",
organizationName := "Anton Sviridov",
homepage := Some(url("https://github.com/indoorvivants/mdoc-effect")),
startYear := Some(2021),
licenses := List(
"Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")
),
developers := List(
Developer(
"keynmol",
"Anton Sviridov",
url("https://blog.indoorvivants.com")
)
)
)
)