Skip to content
This repository has been archived by the owner on May 28, 2019. It is now read-only.

Add Scala 2.13 flags #20

Merged
merged 2 commits into from May 18, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 7 additions & 5 deletions src/main/scala/buildo/ScalaSettingPlugin.scala
Expand Up @@ -16,26 +16,28 @@ object ScalaSettingPlugin extends AutoPlugin {

def crossFlags(scalaVersion: String): Seq[String] =
CrossVersion.partialVersion(scalaVersion) match {
case Some((2, 11)) => Seq("-Yinline-warnings")
case Some((2, 12)) => Seq("-opt-warnings")
case Some((2, 11)) => Seq("-Yinline-warnings", "-Ypartial-unification", "-Xfuture")
case Some((2, 12)) => Seq("-opt-warnings", "-Ypartial-unification", "-Xfuture")
case Some((2, 13)) => Seq("-Ymacro-annotations")
case _ => Nil
}

lazy val baseSettings: Seq[Def.Setting[_]] = Seq(
cancelable in Global := true,
scalacOptions ++= Seq(
"-encoding", "utf8",
"-deprecation", "-feature", "-unchecked", "-Xlint",
"-deprecation",
"-feature",
"-unchecked",
"-Xlint",
"-language:higherKinds",
"-language:implicitConversions",
"-Xfuture",
"-Ywarn-dead-code",
"-Ywarn-numeric-widen",
"-Ywarn-value-discard",
"-Ywarn-unused",
"-Ywarn-unused-import",
"-Yrangepos",
"-Ypartial-unification"
) ++ crossFlags(scalaVersion.value),
resolvers += Resolver.jcenterRepo
)
Expand Down