Skip to content

Commit

Permalink
Add -release 8 scalac option (#3006)
Browse files Browse the repository at this point in the history
  • Loading branch information
regadas committed Jun 1, 2020
1 parent a05f993 commit c66075f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ val commonSettings = Sonatype.sonatypeSettings ++ assemblySettings ++ Seq(
Seq()
}
},
Compile / doc / scalacOptions --= Seq("-release", "8"),
scalacOptions in (Compile, doc) ++= Scalac.compileDocOptions.value,
javacOptions ++= Seq("-source", "1.8", "-target", "1.8", "-Xlint:unchecked"),
javacOptions in (Compile, doc) := Seq("-source", "1.8"),
Expand Down Expand Up @@ -1074,6 +1075,7 @@ lazy val `scio-repl`: Project = project
.settings(commonSettings)
.settings(macroSettings)
.settings(
scalacOptions --= Seq("-release", "8"),
libraryDependencies ++= Seq(
"org.scala-lang.modules" %% "scala-collection-compat" % scalaCollectionCompatVersion,
"org.apache.beam" % "beam-runners-direct-java" % beamVersion,
Expand Down
2 changes: 2 additions & 0 deletions project/ScalacOptions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import sbt._, Keys._
object Scalac {
// see: https://tpolecat.github.io/2017/04/25/scalac-flags.html
val baseOptions = List(
"-release",
"8",
"-target:jvm-1.8",
"-deprecation", // Emit warning and location for usages of deprecated APIs.
"-feature", // Emit warning and location for usages of features that should be imported explicitly.
Expand Down

0 comments on commit c66075f

Please sign in to comment.