Skip to content

Commit 331bc47

Browse files
authored
Merge pull request #3531 from dotty-staging/fix-cleanSbtBridge
fix invalidation of sbt bridge cache
2 parents 9411907 + b64dfe4 commit 331bc47

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

project/Build.scala

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -707,20 +707,12 @@ object Build {
707707

708708
lazy val dottySbtBridgeSettings = Seq(
709709
cleanSbtBridge := {
710-
val dottySbtBridgeVersion = version.value
711-
val dottyVersion = (version in `dotty-compiler`).value
712-
val classVersion = System.getProperty("java.class.version")
713-
714-
val sbtV = sbtVersion.value
715-
val sbtOrg = "org.scala-sbt"
716-
val sbtScalaVersion = "2.10.6"
717-
718710
val home = System.getProperty("user.home")
719-
val org = organization.value
720-
val artifact = moduleName.value
711+
val sbtOrg = "org.scala-sbt"
712+
val bridgeDirectoryPattern = s"*${dottyVersion}*"
721713

722-
IO.delete(file(home) / ".ivy2" / "cache" / sbtOrg / s"$org-$artifact-$dottySbtBridgeVersion-bin_${dottyVersion}__$classVersion")
723-
IO.delete(file(home) / ".sbt" / "boot" / s"scala-$sbtScalaVersion" / sbtOrg / "sbt" / sbtV / s"$org-$artifact-$dottySbtBridgeVersion-bin_${dottyVersion}__$classVersion")
714+
IO.delete((file(home) / ".ivy2" / "cache" / sbtOrg * bridgeDirectoryPattern).get)
715+
IO.delete((file(home) / ".sbt" / "boot" * "scala-*" / sbtOrg / "sbt" * "*" * bridgeDirectoryPattern).get)
724716
},
725717
packageSrc in Compile := (packageSrc in Compile).dependsOn(cleanSbtBridge).value,
726718
description := "sbt compiler bridge for Dotty",

0 commit comments

Comments
 (0)