diff --git a/project/build.properties b/project/build.properties index 0837f7a1..6db98425 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.3.13 +sbt.version=1.4.0 diff --git a/src/main/scala/scalafix/sbt/ScalafixPlugin.scala b/src/main/scala/scalafix/sbt/ScalafixPlugin.scala index db3722e9..7d1f1e04 100644 --- a/src/main/scala/scalafix/sbt/ScalafixPlugin.scala +++ b/src/main/scala/scalafix/sbt/ScalafixPlugin.scala @@ -97,7 +97,11 @@ object ScalafixPlugin extends AutoPlugin { def scalafixConfigSettings(config: Configuration): Seq[Def.Setting[_]] = inConfig(config)( Seq( - scalafix := scalafixInputTask(config).evaluated, + scalafix := { + // force detection of usage of `scalafixCaching` to workaround https://github.com/sbt/sbt/issues/5647 + val _ = scalafixCaching.?.value + scalafixInputTask(config).evaluated + }, compile := Def.taskDyn { val oldCompile = compile.value // evaluated first, before the potential scalafix evaluation