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 14, 2024
1 parent b80efcf commit 1616f27
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,22 @@ ThisBuild / githubWorkflowOSes := Seq("ubuntu-latest", "macos-latest", "windows-

ThisBuild / githubWorkflowJavaVersions := Seq(
JavaSpec.temurin("8"))

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 1616f27

Please sign in to comment.