Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

small fixes #68

Merged
merged 4 commits into from
Aug 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading