Skip to content

Commit

Permalink
Merge pull request #68 from winitzki/feature/small-fixes
Browse files Browse the repository at this point in the history
small fixes
  • Loading branch information
winitzki authored Aug 22, 2024
2 parents 834a7a3 + 11286a7 commit 9f9bebc
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
val scala2V = "2.13.13"
val scala3V = "3.3.3"
val scalaV = scala2V
val scala2V = "2.13.13"
val scala3V = "3.3.3"
val scalaV = scala2V
val scalaOptions =
Seq("-Xsource:3", "-Xfuture") // See https://youtrack.jetbrains.com/issue/SCL-18990/Support-for-some-Scala-3-syntactic-constructs-in-Scala-2-with-Xsource3

val munitTest = "org.scalameta" %% "munit" % "0.7.29" % Test
def munitFramework = new TestFramework("munit.Framework")
Expand All @@ -15,9 +17,11 @@ lazy val chapter01 = (project in file("chapter01"))
.settings(
// Exclude all files under worksheets/ from compilation.
unmanagedSources / excludeFilter ~= {
_ || new FileFilter { def accept(f: File) = ".*/worksheets/.*".r.pattern.matcher(f.getAbsolutePath).matches }
_ || new FileFilter {
def accept(f: File) = ".*/worksheets/.*".r.pattern.matcher(f.getAbsolutePath).matches
}
},
scalacOptions ++= Seq("-Xsource:3.3.3"),
scalacOptions ++= scalaOptions,
scalaVersion := scalaV,
crossScalaVersions := Seq(scala2V, scala3V),
Test / parallelExecution := true,
Expand All @@ -35,7 +39,7 @@ lazy val chapter02 = (project in file("chapter02"))
def accept(f: File) = ".*/worksheets/.*".r.pattern.matcher(f.getAbsolutePath).matches
}
},
scalacOptions ++= Seq("-Xsource:3.3.3"),
scalacOptions ++= scalaOptions,
scalaVersion := scalaV,
crossScalaVersions := Seq(scala2V, scala3V),
Test / parallelExecution := true,
Expand All @@ -46,6 +50,7 @@ lazy val chapter02 = (project in file("chapter02"))
).dependsOn(common)

lazy val common = (project in file("common")).settings(
scalacOptions ++= scalaOptions,
scalaVersion := scalaV,
crossScalaVersions := Seq(scala2V, scala3V),
Test / parallelExecution := true,
Expand Down

0 comments on commit 9f9bebc

Please sign in to comment.