Skip to content

Commit c66075f

Browse files
authored
Add -release 8 scalac option (#3006)
1 parent a05f993 commit c66075f

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

build.sbt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ val commonSettings = Sonatype.sonatypeSettings ++ assemblySettings ++ Seq(
168168
Seq()
169169
}
170170
},
171+
Compile / doc / scalacOptions --= Seq("-release", "8"),
171172
scalacOptions in (Compile, doc) ++= Scalac.compileDocOptions.value,
172173
javacOptions ++= Seq("-source", "1.8", "-target", "1.8", "-Xlint:unchecked"),
173174
javacOptions in (Compile, doc) := Seq("-source", "1.8"),
@@ -1074,6 +1075,7 @@ lazy val `scio-repl`: Project = project
10741075
.settings(commonSettings)
10751076
.settings(macroSettings)
10761077
.settings(
1078+
scalacOptions --= Seq("-release", "8"),
10771079
libraryDependencies ++= Seq(
10781080
"org.scala-lang.modules" %% "scala-collection-compat" % scalaCollectionCompatVersion,
10791081
"org.apache.beam" % "beam-runners-direct-java" % beamVersion,

project/ScalacOptions.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ import sbt._, Keys._
2020
object Scalac {
2121
// see: https://tpolecat.github.io/2017/04/25/scalac-flags.html
2222
val baseOptions = List(
23+
"-release",
24+
"8",
2325
"-target:jvm-1.8",
2426
"-deprecation", // Emit warning and location for usages of deprecated APIs.
2527
"-feature", // Emit warning and location for usages of features that should be imported explicitly.

0 commit comments

Comments
 (0)