Skip to content

Commit

Permalink
Add sensible scalac options
Browse files Browse the repository at this point in the history
  • Loading branch information
mdedetrich committed Feb 8, 2024
1 parent 76c7014 commit fe87d0c
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -188,3 +188,23 @@ def project(id: String, base: File): Project = {
scalaVersion := scala212
)
}

// compile settings
ThisBuild / scalacOptions ++= List(
"-unchecked",
"-deprecation",
"-language:_",
"-encoding",
"UTF-8"
)

ThisBuild / scalacOptions ++= {
if (insideCI.value) {
val log = sLog.value
log.info("Running in CI, enabling Scala2 optimizer")
Seq(
"-opt-inline-from:<sources>",
"-opt:l:inline"
)
} else Nil
}

0 comments on commit fe87d0c

Please sign in to comment.