Skip to content

Commit eabdbf4

Browse files
author
Dean Wampler
committed
Bumped to Scala 3.0.0!
1 parent 66afb28 commit eabdbf4

File tree

3 files changed

+16
-15
lines changed

3 files changed

+16
-15
lines changed

build.sbt

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,38 @@
1+
val scala3 = "3.0.0"
12
lazy val root = project
23
.in(file("."))
34
.settings(
45
name := "programming-scala-3rd-ed-code-examples",
56
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,
89
organization := "org.programming-scala",
910
organizationName := "ProgrammingScala",
1011
organizationHomepage := Some(url("http://programming-scala.org")),
1112
homepage := Some(url("https://github.com/deanwampler/programming-scala-book-code-examples/")),
1213
licenses += "Apache2" -> url("http://www.apache.org/licenses/LICENSE-2.0"),
1314
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
1418
libraryDependencies ++= Seq(
1519
"com.typesafe.akka" %% "akka-actor-typed" % "2.6.14",
1620
"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",
2124
"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",
2326
"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
2730
),
2831

29-
// For Scala 3 (Dotty)
32+
// For Scala 3
3033
// The -rewrite and -migration options are best used while migrating
3134
// 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
3336
// deprecation warnings for obsolete concepts that are being transitioned
3437
// out. Use the default value if you are migrating from Scala 2!!
3538
scalacOptions := Seq(

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=1.5.0
1+
sbt.version=1.5.2

project/plugins.sbt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,3 @@ resolvers ++= Seq(
22
"Sonatype Releases" at "https://oss.sonatype.org/content/repositories/releases",
33
"Sonatype snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/"
44
)
5-
6-
addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.5.3")

0 commit comments

Comments
 (0)