diff --git a/build.sbt b/build.sbt index 63ffc0b129..1b1a09b143 100644 --- a/build.sbt +++ b/build.sbt @@ -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"), @@ -1073,6 +1074,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, diff --git a/project/ScalacOptions.scala b/project/ScalacOptions.scala index 103218aee4..c9416c00d0 100644 --- a/project/ScalacOptions.scala +++ b/project/ScalacOptions.scala @@ -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.