|
| 1 | +val scala3 = "3.0.0" |
1 | 2 | lazy val root = project
|
2 | 3 | .in(file("."))
|
3 | 4 | .settings(
|
4 | 5 | name := "programming-scala-3rd-ed-code-examples",
|
5 | 6 | description := "Code examples for Programming Scala, Third Edition (O'Reilly).",
|
6 |
| - version := "3.0.0-RC3-002", |
7 |
| - scalaVersion := "3.0.0-RC3", |
| 7 | + version := s"$scala3-001", |
| 8 | + scalaVersion := scala3, |
8 | 9 | organization := "org.programming-scala",
|
9 | 10 | organizationName := "ProgrammingScala",
|
10 | 11 | organizationHomepage := Some(url("http://programming-scala.org")),
|
11 | 12 | homepage := Some(url("https://github.com/deanwampler/programming-scala-book-code-examples/")),
|
12 | 13 | licenses += "Apache2" -> url("http://www.apache.org/licenses/LICENSE-2.0"),
|
13 | 14 | maxErrors := 10,
|
| 15 | + // At the time of publication, Scala 3 builds of Akka were not yet available. |
| 16 | + // Notice how the Scala 2.13-built libraries are used. For more information: |
| 17 | + // https://www.scala-lang.org/blog/2021/04/08/scala-3-in-sbt.html |
14 | 18 | libraryDependencies ++= Seq(
|
15 | 19 | "com.typesafe.akka" %% "akka-actor-typed" % "2.6.14",
|
16 | 20 | "com.typesafe.akka" %% "akka-slf4j" % "2.6.14",
|
17 |
| - // Map over this sequence of Scala 2.X libraries & call withDottyCompat(...): |
18 |
| - ).map(dep => dep.withDottyCompat(scalaVersion.value)) ++ Seq( |
19 |
| - // Libraries that already fully support Dotty/Scala 3: |
20 |
| - "org.typelevel" %% "cats-core" % "2.6.0", |
| 21 | + ).map(dep => dep.cross(CrossVersion.for3Use2_13)) ++ Seq( |
| 22 | + // Libraries that already fully support Scala 3: |
| 23 | + "org.typelevel" %% "cats-core" % "2.6.1", |
21 | 24 | "org.scala-lang" %% "scala3-staging" % scalaVersion.value,
|
22 |
| - "org.scala-lang.modules" %% "scala-parser-combinators" % "1.2.0-RC2", |
| 25 | + "org.scala-lang.modules" %% "scala-parser-combinators" % "2.0.0", |
23 | 26 | "ch.qos.logback" % "logback-classic" % "1.2.3",
|
24 |
| - "org.scalacheck" %% "scalacheck" % "1.15.3" % Test, |
25 |
| - "org.scalameta" %% "munit" % "0.7.25" % Test, |
26 |
| - "org.scalameta" %% "munit-scalacheck" % "0.7.25" % Test |
| 27 | + "org.scalacheck" %% "scalacheck" % "1.15.4" % Test, |
| 28 | + "org.scalameta" %% "munit" % "0.7.26" % Test, |
| 29 | + "org.scalameta" %% "munit-scalacheck" % "0.7.26" % Test |
27 | 30 | ),
|
28 | 31 |
|
29 |
| - // For Scala 3 (Dotty) |
| 32 | + // For Scala 3 |
30 | 33 | // The -rewrite and -migration options are best used while migrating
|
31 | 34 | // from Scala 2 to Scala 3, then removed.
|
32 |
| - // The default value for -source is 3.0. I'm using 3.1 to force more |
| 35 | + // The default value for -source is 3.0. I'm using future to force more |
33 | 36 | // deprecation warnings for obsolete concepts that are being transitioned
|
34 | 37 | // out. Use the default value if you are migrating from Scala 2!!
|
35 | 38 | scalacOptions := Seq(
|
|
0 commit comments