From 0131c36e763e471ed62e2a2ab504449017eac1f4 Mon Sep 17 00:00:00 2001 From: Brice Jaglin Date: Mon, 5 Oct 2020 22:50:07 +0200 Subject: [PATCH 1/2] sbt 1.4.0 --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 47af7400999aa10ede62a1676ee497ff80c5bded Mon Sep 17 00:00:00 2001 From: Brice Jaglin Date: Tue, 6 Oct 2020 00:15:55 +0200 Subject: [PATCH 2/2] prevent sbt 1.4.0 lintUnused warn when scalafixCaching is defined --- src/main/scala/scalafix/sbt/ScalafixPlugin.scala | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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