33// Our Scala versions.
44lazy val `scala-2.12` = " 2.12.13"
55lazy val `scala-2.13` = " 2.13.5"
6- lazy val `scala-3.0-prev` = " 3.0.0-RC1 "
7- lazy val `scala-3.0-curr` = " 3.0.0-RC2 "
6+ lazy val `scala-3.0-prev` = " 3.0.0-RC2 "
7+ lazy val `scala-3.0-curr` = " 3.0.0-RC3 "
88
99// This is used in a couple places
10- lazy val fs2Version = " 2.5.4 "
10+ lazy val fs2Version = " 2.5.5 "
1111
1212// Global Settings
1313lazy val commonSettings = Seq (
@@ -38,25 +38,25 @@ lazy val commonSettings = Seq(
3838 scalaVersion := `scala-2.13`,
3939 crossScalaVersions := Seq (`scala-2.12`, `scala-2.13`, `scala-3.0-prev`, `scala-3.0-curr`),
4040 scalacOptions -= " -language:experimental.macros" , // doesn't work cross-version
41- Compile / doc / scalacOptions --= Seq (" -Xfatal-warnings" ),
42- Compile / doc / scalacOptions ++= Seq (
41+ Compile / doc / scalacOptions --= Seq (" -Xfatal-warnings" ),
42+ Compile / doc / scalacOptions ++= Seq (
4343 " -groups" ,
44- " -sourcepath" , (baseDirectory in LocalRootProject ).value.getAbsolutePath,
44+ " -sourcepath" , (LocalRootProject / baseDirectory ).value.getAbsolutePath,
4545 " -doc-source-url" , " https://github.com/tpolecat/skunk/blob/v" + version.value + " €{FILE_PATH}.scala" ,
4646 ),
4747 libraryDependencies ++= Seq (
4848 compilerPlugin(" org.typelevel" %% " kind-projector" % " 0.11.3" cross CrossVersion .full),
49- ).filterNot(_ => isDotty .value),
49+ ).filterNot(_ => scalaVersion .value.startsWith( " 3. " ) ),
5050
5151 // Coverage Exclusions
5252 coverageExcludedPackages := " ffstest.*;tests.*;example.*;natchez.http4s.*" ,
5353
5454 // uncomment in case of emergency
55- // scalacOptions ++= { if (isDotty .value) Seq("-source:3.0-migration") else Nil },
55+ // scalacOptions ++= { if (scalaVersion .value.startsWith("3.") ) Seq("-source:3.0-migration") else Nil },
5656
5757 // Add some more source directories
58- unmanagedSourceDirectories in Compile ++= {
59- val sourceDir = (sourceDirectory in Compile ).value
58+ Compile / unmanagedSourceDirectories ++= {
59+ val sourceDir = (Compile / sourceDirectory ).value
6060 CrossVersion .partialVersion(scalaVersion.value) match {
6161 case Some ((3 , _)) => Seq (sourceDir / " scala-3" , sourceDir / " scala-2.13+" )
6262 case Some ((2 , 12 )) => Seq (sourceDir / " scala-2" )
@@ -66,8 +66,8 @@ lazy val commonSettings = Seq(
6666 },
6767
6868 // Also for test
69- unmanagedSourceDirectories in Test ++= {
70- val sourceDir = (sourceDirectory in Test ).value
69+ Test / unmanagedSourceDirectories ++= {
70+ val sourceDir = (Test / sourceDirectory ).value
7171 CrossVersion .partialVersion(scalaVersion.value) match {
7272 case Some ((3 , _)) => Seq (sourceDir / " scala-3" )
7373 case Some ((2 , _)) => Seq (sourceDir / " scala-2" )
@@ -78,7 +78,7 @@ lazy val commonSettings = Seq(
7878 // dottydoc really doesn't work at all right now
7979 Compile / doc / sources := {
8080 val old = (Compile / doc / sources).value
81- if (isDotty .value)
81+ if (scalaVersion .value.startsWith( " 3. " ) )
8282 Seq ()
8383 else
8484 old
@@ -103,20 +103,19 @@ lazy val core = project
103103 description := " Tagless, non-blocking data access library for Postgres." ,
104104 resolvers += " Sonatype OSS Snapshots" at " https://oss.sonatype.org/content/repositories/snapshots" ,
105105 libraryDependencies ++= Seq (
106- " org.typelevel" %% " cats-core" % " 2.5.0" ,
107- " org.typelevel" %% " cats-effect" % " 2.4.1" ,
108- " co.fs2" %% " fs2-core" % fs2Version,
109- " co.fs2" %% " fs2-io" % fs2Version,
110- " org.scodec" %% " scodec-core" % (if (isDotty.value) " 2.0.0-RC2" else " 1.11.7" ),
111- " org.scodec" %% " scodec-cats" % " 1.1.0-RC2" ,
112- " org.tpolecat" %% " natchez-core" % " 0.0.22" ,
113- " org.tpolecat" %% " sourcepos" % " 0.1.2" ,
114- " com.ongres.scram" % " client" % " 2.1" ,
106+ " org.typelevel" %% " cats-core" % " 2.6.0" ,
107+ " org.typelevel" %% " cats-effect" % " 2.5.0" ,
108+ " co.fs2" %% " fs2-core" % fs2Version,
109+ " co.fs2" %% " fs2-io" % fs2Version,
110+ " org.scodec" %% " scodec-core" % (if (scalaVersion.value.startsWith(" 3." )) " 2.0.0-RC3" else " 1.11.7" ),
111+ " org.scodec" %% " scodec-cats" % " 1.1.0-RC3" ,
112+ " org.tpolecat" %% " natchez-core" % " 0.0.24" ,
113+ " org.tpolecat" %% " sourcepos" % " 0.1.3" ,
114+ " com.ongres.scram" % " client" % " 2.1" ,
115+ " org.scala-lang.modules" %% " scala-collection-compat" % " 2.4.3" ,
115116 ) ++ Seq (
116117 " com.beachape" %% " enumeratum" % " 1.6.1" ,
117- ).map(_.withDottyCompat(scalaVersion.value)) ++ Seq (
118- " org.scala-lang.modules" %% " scala-collection-compat" % " 2.4.3" ,
119- )
118+ ).filterNot(_ => scalaVersion.value.startsWith(" 3." ))
120119 )
121120
122121lazy val refined = project
@@ -127,7 +126,7 @@ lazy val refined = project
127126 .settings(
128127 libraryDependencies ++= Seq (
129128 " eu.timepit" %% " refined" % " 0.9.24" ,
130- ).map(_.withDottyCompat(scalaVersion.value))
129+ )
131130 )
132131
133132lazy val circe = project
@@ -137,10 +136,18 @@ lazy val circe = project
137136 .settings(commonSettings)
138137 .settings(
139138 name := " skunk-circe" ,
140- libraryDependencies ++= Seq (
141- " io.circe" %% " circe-core" % " 0.13.0" ,
142- " io.circe" %% " circe-parser" % " 0.13.0"
143- ).filterNot(_ => isDotty.value)
139+ libraryDependencies ++= {
140+ lazy val circeVersion : String =
141+ scalaVersion.value match {
142+ case `scala-3.0-curr` => " 0.14.0-M6"
143+ case `scala-3.0-prev` => " 0.14.0-M5"
144+ case _ => " 0.13.0"
145+ }
146+ Seq (
147+ " io.circe" %% " circe-core" % circeVersion,
148+ " io.circe" %% " circe-parser" % circeVersion
149+ )
150+ }
144151 )
145152
146153lazy val tests = project
@@ -152,14 +159,14 @@ lazy val tests = project
152159 publish / skip := true ,
153160 scalacOptions -= " -Xfatal-warnings" ,
154161 libraryDependencies ++= Seq (
155- " org.typelevel" %% " scalacheck-effect-munit" % " 1.0.0 " ,
156- " org.typelevel" %% " munit-cats-effect-2" % " 1.0.1 " ,
157- " org.typelevel" %% " cats-free" % " 2.5 .0" ,
158- " org.typelevel" %% " cats-laws" % " 2.5 .0" ,
159- " org.typelevel" %% " discipline-munit" % " 1.0.7 " ,
162+ " org.typelevel" %% " scalacheck-effect-munit" % " 1.0.1 " ,
163+ " org.typelevel" %% " munit-cats-effect-2" % " 1.0.2 " ,
164+ " org.typelevel" %% " cats-free" % " 2.6 .0" ,
165+ " org.typelevel" %% " cats-laws" % " 2.6 .0" ,
166+ " org.typelevel" %% " discipline-munit" % " 1.0.8 " ,
160167 ) ++ Seq (
161168 " io.chrisdavenport" %% " cats-time" % " 0.3.4" ,
162- ).filterNot(_ => isDotty .value),
169+ ).filterNot(_ => scalaVersion .value.startsWith( " 3. " ) ),
163170 testFrameworks += new TestFramework (" munit.Framework" )
164171 )
165172
@@ -171,14 +178,14 @@ lazy val example = project
171178 .settings(
172179 publish / skip := true ,
173180 libraryDependencies ++= Seq (
174- " org.tpolecat" %% " natchez-honeycomb" % " 0.0.22 " ,
175- " org.tpolecat" %% " natchez-jaeger" % " 0.0.22 " ,
181+ " org.tpolecat" %% " natchez-honeycomb" % " 0.0.24 " ,
182+ " org.tpolecat" %% " natchez-jaeger" % " 0.0.24 " ,
176183 ) ++ Seq (
177184 " org.http4s" %% " http4s-dsl" % " 0.21.22" ,
178185 " org.http4s" %% " http4s-blaze-server" % " 0.21.22" ,
179186 " org.http4s" %% " http4s-circe" % " 0.21.22" ,
180187 " io.circe" %% " circe-generic" % " 0.13.0" ,
181- ).filterNot(_ => isDotty .value)
188+ ).filterNot(_ => scalaVersion .value.startsWith( " 3. " ) )
182189 )
183190
184191lazy val docs = project
@@ -198,7 +205,7 @@ lazy val docs = project
198205 paradoxTheme := Some (builtinParadoxTheme(" generic" )),
199206 version := version.value.takeWhile(_ != '+' ), // strip off the +3-f22dca22+20191110-1520-SNAPSHOT business
200207 paradoxProperties ++= Map (
201- " scala-versions" -> (crossScalaVersions in core ).value.map(CrossVersion .partialVersion).flatten.map(_._2).mkString(" 2." , " /" , " " ),
208+ " scala-versions" -> (core / crossScalaVersions ).value.map(CrossVersion .partialVersion).flatten.map(_._2).mkString(" 2." , " /" , " " ),
202209 " org" -> organization.value,
203210 " scala.binary.version" -> s " 2. ${CrossVersion .partialVersion(scalaVersion.value).get._2}" ,
204211 " core-dep" -> s " ${(core / name).value}_2. ${CrossVersion .partialVersion(scalaVersion.value).get._2}" ,
0 commit comments