Skip to content

Commit

Permalink
update scalacOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
xuwei-k committed Oct 6, 2024
1 parent d90dc9b commit 83e80fc
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,19 @@ licenses := Seq("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0"
publishMavenStyle := true
scalacOptions ++= Seq("-deprecation", "-feature", "-language:implicitConversions")

val unusedWarnings = Seq("-Ywarn-unused:imports")
val unusedWarnings = Def.setting(
scalaBinaryVersion.value match {
case "2.12" =>
Seq("-Ywarn-unused:imports")
case _ =>
Seq("-Wunused:imports")
}
)

scalacOptions ++= unusedWarnings
scalacOptions ++= unusedWarnings.value

Seq(Compile, Test).flatMap(c =>
c / console / scalacOptions --= unusedWarnings
c / console / scalacOptions --= unusedWarnings.value
)

def hash(): String = sys.process.Process("git rev-parse HEAD").lineStream_!.head
Expand Down

0 comments on commit 83e80fc

Please sign in to comment.