11import microsites .MicrositesPlugin .autoImport .micrositeDescription
22
3- val scalaVer : String = " 2.13.8"
3+ val scala213Version = " 2.13.8"
4+ val scala3Version = " 3.2.2"
45
5- ThisBuild / scalaVersion := scalaVer
6+ val scalaVersions = Seq (scala213Version, scala3Version)
67
78ThisBuild / organization := " com.ovoenergy"
89
@@ -44,6 +45,8 @@ val common = Seq(
4445 libraryDependencies ++= Seq (
4546 compilerPlugin(" com.olegpy" %% " better-monadic-for" % " 0.3.1" ),
4647 compilerPlugin(" org.typelevel" % " kind-projector" % " 0.13.2" cross CrossVersion .full),
48+ ).filterNot(_ => scalaVersion.value.startsWith(" 3." )),
49+ libraryDependencies ++= Seq (
4750 " org.typelevel" %% " cats-core" % " 2.7.0" ,
4851 " org.typelevel" %% " cats-effect" % " 3.3.5" ,
4952 " org.scalameta" %% " munit" % " 0.7.29" % Test ,
@@ -53,8 +56,9 @@ val common = Seq(
5356 )
5457)
5558
56- lazy val metricsCommon = project
59+ lazy val metricsCommon = projectMatrix
5760 .in(file(" natchez-extras-metrics" ))
61+ .jvmPlatform(scalaVersions = scalaVersions)
5862 .enablePlugins(GitVersioning )
5963 .settings(common :+ (name := " natchez-extras-metrics" ))
6064
@@ -70,7 +74,7 @@ val doobieVersion = "1.0.0-RC2"
7074lazy val natchezDatadog = projectMatrix
7175 .in(file(" natchez-extras-datadog" ))
7276 .customRow(
73- scalaVersions = Seq (scalaVer) ,
77+ scalaVersions = scalaVersions ,
7478 axisValues = Seq (Http4sVersion .Milestone , VirtualAxis .jvm),
7579 settings = List (
7680 name := " natchez-extras-datadog" ,
@@ -82,7 +86,7 @@ lazy val natchezDatadog = projectMatrix
8286 )
8387 )
8488 .customRow(
85- scalaVersions = Seq (scalaVer) ,
89+ scalaVersions = scalaVersions ,
8690 axisValues = Seq (Http4sVersion .Stable , VirtualAxis .jvm),
8791 settings = List (
8892 name := " natchez-extras-datadog-stable" ,
@@ -100,14 +104,14 @@ lazy val natchezDatadog = projectMatrix
100104 " org.tpolecat" %% " natchez-core" % natchezVersion,
101105 " io.circe" %% " circe-core" % circeVersion,
102106 " io.circe" %% " circe-generic" % circeVersion,
103- " io.circe" %% " circe-generic-extras" % circeVersion,
104107 " io.circe" %% " circe-parser" % circeVersion,
105108 " org.slf4j" % " slf4j-api" % slf4jVersion
106109 )
107110 )
108111
109- lazy val natchezSlf4j = project
112+ lazy val natchezSlf4j = projectMatrix
110113 .in(file(" natchez-extras-slf4j" ))
114+ .jvmPlatform(scalaVersions = scalaVersions)
111115 .enablePlugins(GitVersioning )
112116 .settings(common :+ (name := " natchez-extras-slf4j" ))
113117 .settings(
@@ -121,7 +125,7 @@ lazy val natchezSlf4j = project
121125lazy val natchezHttp4s = projectMatrix
122126 .in(file(" natchez-extras-http4s" ))
123127 .customRow(
124- scalaVersions = Seq (scalaVer) ,
128+ scalaVersions = scalaVersions ,
125129 axisValues = Seq (Http4sVersion .Milestone , VirtualAxis .jvm),
126130 settings = List (
127131 name := " natchez-extras-http4s" ,
@@ -132,7 +136,7 @@ lazy val natchezHttp4s = projectMatrix
132136 )
133137 )
134138 .customRow(
135- scalaVersions = Seq (scalaVer) ,
139+ scalaVersions = scalaVersions ,
136140 axisValues = Seq (Http4sVersion .Stable , VirtualAxis .jvm),
137141 settings = List (
138142 name := " natchez-extras-http4s-stable" ,
@@ -142,7 +146,7 @@ lazy val natchezHttp4s = projectMatrix
142146 )
143147 )
144148 )
145- .configure(_. dependsOn(natchezTestkit) )
149+ .dependsOn(natchezTestkit)
146150 .enablePlugins(GitVersioning )
147151 .settings(common)
148152 .settings(
@@ -151,8 +155,9 @@ lazy val natchezHttp4s = projectMatrix
151155 )
152156 )
153157
154- lazy val natchezLog4Cats = project
158+ lazy val natchezLog4Cats = projectMatrix
155159 .in(file(" natchez-extras-log4cats" ))
160+ .jvmPlatform(scalaVersions = scalaVersions)
156161 .enablePlugins(GitVersioning )
157162 .settings(common :+ (name := " natchez-extras-log4cats" ))
158163 .settings(
@@ -162,8 +167,9 @@ lazy val natchezLog4Cats = project
162167 )
163168 )
164169
165- lazy val natchezTestkit = project
170+ lazy val natchezTestkit = projectMatrix
166171 .in(file(" natchez-extras-testkit" ))
172+ .jvmPlatform(scalaVersions = scalaVersions)
167173 .enablePlugins(GitVersioning )
168174 .settings(common :+ (name := " natchez-extras-testkit" ))
169175 .settings(
@@ -172,21 +178,23 @@ lazy val natchezTestkit = project
172178 )
173179 )
174180
175- lazy val natchezFs2 = project
181+ lazy val natchezFs2 = projectMatrix
176182 .in(file(" natchez-extras-fs2" ))
183+ .jvmPlatform(scalaVersions = scalaVersions)
177184 .dependsOn(natchezTestkit)
178185 .enablePlugins(GitVersioning )
179186 .settings(common :+ (name := " natchez-extras-fs2" ))
180187 .settings(
181188 libraryDependencies ++= Seq (
182- " org.typelevel" %% " kittens" % " 2.3.2 " ,
189+ " org.typelevel" %% " kittens" % " 3.0.0-M4 " ,
183190 " org.tpolecat" %% " natchez-core" % natchezVersion,
184191 " co.fs2" %% " fs2-core" % fs2Version
185192 )
186193 )
187194
188- lazy val natchezDoobie = project
195+ lazy val natchezDoobie = projectMatrix
189196 .in(file(" natchez-extras-doobie" ))
197+ .jvmPlatform(scalaVersions = scalaVersions)
190198 .enablePlugins(GitVersioning )
191199 .settings(common :+ (name := " natchez-extras-doobie" ))
192200 .settings(
@@ -198,23 +206,26 @@ lazy val natchezDoobie = project
198206 )
199207 .dependsOn(core)
200208
201- lazy val core = project
209+ lazy val core = projectMatrix
202210 .in(file(" natchez-extras-core" ))
211+ .jvmPlatform(scalaVersions = scalaVersions)
203212 .enablePlugins(GitVersioning )
204213 .settings(
205214 common ++ Seq (
206215 name := " natchez-extras-core" ,
207216 )
208217 )
209218
210- lazy val natchezCombine = project
219+ lazy val natchezCombine = projectMatrix
211220 .in(file(" natchez-extras-combine" ))
221+ .jvmPlatform(scalaVersions = scalaVersions)
212222 .enablePlugins(GitVersioning )
213223 .settings(common :+ (name := " natchez-extras-combine" ))
214224 .settings(libraryDependencies += " org.tpolecat" %% " natchez-core" % natchezVersion)
215225
216- lazy val datadogMetrics = project
226+ lazy val datadogMetrics = projectMatrix
217227 .in(file(" natchez-extras-dogstatsd" ))
228+ .jvmPlatform(scalaVersions = scalaVersions)
218229 .enablePlugins(GitVersioning )
219230 .settings(common :+ (name := " natchez-extras-dogstatsd" ))
220231 .dependsOn(metricsCommon)
@@ -225,35 +236,39 @@ lazy val datadogMetrics = project
225236 )
226237 )
227238
228- lazy val ce3Utils = project
239+ lazy val ce3Utils = projectMatrix
229240 .in(file(" natchez-ce3" ))
241+ .jvmPlatform(scalaVersions = scalaVersions)
230242 .enablePlugins(GitVersioning )
231243 .settings(common :+ (name := " natchez-extras-ce3" ))
232244 .settings(libraryDependencies += " org.tpolecat" %% " natchez-core" % natchezVersion)
233245
234246val logbackVersion = " 1.2.3"
235247
236- lazy val datadogStable = natchezDatadog.finder(Http4sVersion .Stable , VirtualAxis .jvm)(scalaVer)
237- lazy val datadogMilestone = natchezDatadog.finder(Http4sVersion .Milestone , VirtualAxis .jvm)(scalaVer)
248+ lazy val datadogStable213 = natchezDatadog.finder(Http4sVersion .Stable , VirtualAxis .jvm)(scala213Version)
249+ lazy val datadogMilestone213 =
250+ natchezDatadog.finder(Http4sVersion .Milestone , VirtualAxis .jvm)(scala213Version)
238251
239- lazy val natchezHttp4sStable = natchezHttp4s.finder(Http4sVersion .Stable , VirtualAxis .jvm)(scalaVer)
240- lazy val natchezHttp4sMilestone = natchezHttp4s.finder(Http4sVersion .Milestone , VirtualAxis .jvm)(scalaVer)
252+ lazy val natchezHttp4sStable213 = natchezHttp4s.finder(Http4sVersion .Stable , VirtualAxis .jvm)(scala213Version)
253+ lazy val natchezHttp4sMilestone213 =
254+ natchezHttp4s.finder(Http4sVersion .Milestone , VirtualAxis .jvm)(scala213Version)
241255
242256lazy val docs = project
243257 .in(file(" docs" ))
244258 .enablePlugins(MicrositesPlugin )
245259 .dependsOn(
246- datadogMetrics ,
247- natchezDoobie ,
248- datadogStable ,
249- natchezCombine ,
250- natchezSlf4j ,
251- natchezFs2 ,
252- natchezHttp4sStable ,
253- natchezLog4Cats ,
254- ce3Utils
260+ ce3Utils.jvm(scala213Version) ,
261+ datadogMetrics.jvm(scala213Version) ,
262+ natchezDoobie.jvm(scala213Version) ,
263+ datadogStable213 ,
264+ natchezCombine.jvm(scala213Version) ,
265+ natchezSlf4j.jvm(scala213Version) ,
266+ natchezFs2.jvm(scala213Version) ,
267+ natchezHttp4sStable213 ,
268+ natchezLog4Cats.jvm(scala213Version)
255269 )
256270 .settings(
271+ scalaVersion := scala213Version,
257272 micrositeName := " natchez-extras" ,
258273 micrositeBaseUrl := " /natchez-extras" ,
259274 micrositeDocumentationUrl := " /natchez-extras/docs" ,
@@ -282,21 +297,17 @@ lazy val root = (project in file("."))
282297 publish / skip := true
283298 )
284299 )
285- .aggregate(
286- core,
287- metricsCommon,
288- datadogMetrics,
289- datadogMilestone,
290- datadogStable,
291- natchezCombine,
292- natchezSlf4j,
293- natchezDoobie,
294- natchezLog4Cats,
295- natchezHttp4sMilestone,
296- natchezHttp4sStable,
297- natchezFs2,
298- natchezTestkit,
299- ce3Utils
300- )
300+ .aggregate(core.projectRefs: _* )
301+ .aggregate(ce3Utils.projectRefs: _* )
302+ .aggregate(metricsCommon.projectRefs: _* )
303+ .aggregate(datadogMetrics.projectRefs: _* )
304+ .aggregate(natchezDatadog.projectRefs: _* )
305+ .aggregate(natchezCombine.projectRefs: _* )
306+ .aggregate(natchezSlf4j.projectRefs: _* )
307+ .aggregate(natchezDoobie.projectRefs: _* )
308+ .aggregate(natchezLog4Cats.projectRefs: _* )
309+ .aggregate(natchezHttp4s.projectRefs: _* )
310+ .aggregate(natchezFs2.projectRefs: _* )
311+ .aggregate(natchezTestkit.projectRefs: _* )
301312
302313Global / onChangedBuildSource := ReloadOnSourceChanges
0 commit comments