Keep targetting Java 7 with scala 2.10 and 2.11

This commit is contained in:
Alexandre Archambault 2016-10-22 22:24:42 +02:00
parent fb9be8430d
commit ac4ce5f4f5
No known key found for this signature in database
GPG Key ID: 14640A6839C263A9
1 changed files with 19 additions and 0 deletions

View File

@ -74,6 +74,25 @@ lazy val scalaVersionAgnosticCommonSettings = Seq(
"Scalaz Bintray Repo" at "http://dl.bintray.com/scalaz/releases",
Resolver.sonatypeRepo("releases")
),
scalacOptions ++= {
scalaBinaryVersion.value match {
case "2.10" | "2.11" =>
Seq("-target:jvm-1.7")
case _ =>
Seq()
}
},
javacOptions ++= {
scalaBinaryVersion.value match {
case "2.10" | "2.11" =>
Seq(
"-source", "1.7",
"-target", "1.7"
)
case _ =>
Seq()
}
},
javacOptions in Keys.doc := Seq()
) ++ releaseSettings