Skip to content

Commit 3e3f916

Browse files
committed
Add sensible scalacOptions
1 parent a0383bd commit 3e3f916

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

build.sbt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,25 @@ scriptedLaunchOpts ++= Seq(
2323
"-Dplugin.version=" + version.value
2424
)
2525

26+
scalacOptions ++= Seq(
27+
"-unchecked",
28+
"-deprecation",
29+
"-Xlint",
30+
"-encoding",
31+
"UTF-8"
32+
)
33+
34+
scalacOptions ++= {
35+
if (insideCI.value) {
36+
val log = sLog.value
37+
log.info("Running in CI, enabling Scala2 optimizer")
38+
Seq(
39+
"-opt-inline-from:<sources>",
40+
"-opt:l:inline"
41+
)
42+
} else Nil
43+
}
44+
2645
// So that publishLocal doesn't continuously create new versions
2746
def versionFmt(out: sbtdynver.GitDescribeOutput): String = {
2847
val snapshotSuffix =

0 commit comments

Comments
 (0)