diff --git a/build.sbt b/build.sbt index aecd4c5..9a4c83d 100644 --- a/build.sbt +++ b/build.sbt @@ -1,11 +1,27 @@ name := "sbt-apache-sonatype" sbtPlugin := true organization := "org.mdedetrich" -scalacOptions ++= Seq( - "-opt:l:inline", - "-opt-inline-from:" + +// compile settings +scalacOptions ++= List( + "-unchecked", + "-deprecation", + "-language:_", + "-encoding", + "UTF-8" ) +scalacOptions ++= { + if (insideCI.value) { + val log = sLog.value + log.info("Running in CI, enabling Scala2 optimizer") + Seq( + "-opt-inline-from:", + "-opt:l:inline" + ) + } else Nil +} + lazy val scala212 = "2.12.18" ThisBuild / crossScalaVersions := Seq(scala212) ThisBuild / scalaVersion := scala212