Skip to content

Commit

Permalink
Merge pull request #61 from seveneves/bugfix/issue_60
Browse files Browse the repository at this point in the history
Fix #60 when scalac options specified in ThisBuild scope by user are ignored
  • Loading branch information
DavidGregory084 authored Apr 4, 2022
2 parents 831ae82 + f1aa0bf commit 2d6a689
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/scala/io/github/davidgregory084/TpolecatPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -120,16 +120,16 @@ object TpolecatPlugin extends AutoPlugin {
tpolecatCiModeEnvVar := "SBT_TPOLECAT_CI",
tpolecatReleaseModeEnvVar := "SBT_TPOLECAT_RELEASE",
tpolecatOptionsMode := {
if (sys.env.get(tpolecatReleaseModeEnvVar.value).nonEmpty) ReleaseMode
else if (sys.env.get(tpolecatCiModeEnvVar.value).nonEmpty) CiMode
else if (sys.env.get(tpolecatDevModeEnvVar.value).nonEmpty) DevMode
if (sys.env.contains(tpolecatReleaseModeEnvVar.value)) ReleaseMode
else if (sys.env.contains(tpolecatCiModeEnvVar.value)) CiMode
else if (sys.env.contains(tpolecatDevModeEnvVar.value)) DevMode
else tpolecatDefaultOptionsMode.value
}
) ++ commandAliases

override def projectSettings: Seq[Setting[_]] = Seq(
Def.derive(
scalacOptions := scalacOptionsFor(scalaVersion.value, tpolecatScalacOptions.value)
scalacOptions ++= scalacOptionsFor(scalaVersion.value, tpolecatScalacOptions.value)
),
tpolecatDevModeOptions := ScalacOptions.default,
Def.derive(
Expand Down

0 comments on commit 2d6a689

Please sign in to comment.