Skip to content

Commit

Permalink
update scalacOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
xuwei-k authored Aug 25, 2024
1 parent da5769f commit be86c44
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,16 @@ lazy val compileSettings = Seq(
)
}
},
scalacOptions ++= {
scalaBinaryVersion.value match {
case "2.12" =>
Seq("-Xsource:3", "-language:higherKinds")
case "2.13" =>
Seq("-Xsource:3-cross")
case _ =>
Nil
}
},
scalacOptions ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, v)) if v <= 12 =>
Expand All @@ -117,7 +127,6 @@ lazy val compileSettings = Seq(
"-deprecation",
"-unchecked",
"-language:existentials",
"-language:higherKinds",
"-language:implicitConversions"
)
) ++ Seq(Compile, Test).flatMap(c => c / console / scalacOptions --= unusedWarnings)
Expand Down

0 comments on commit be86c44

Please sign in to comment.