Merge pull request #5157 from eatkins/safe-clean

Clean ivy resolution cache before regular clean
This commit is contained in:
eugene yokota 2019-10-06 06:38:54 -04:00 committed by GitHub
commit 11bc90c481
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View File

@ -484,10 +484,8 @@ object Defaults extends BuildCommon {
sbtPlugin.value,
crossPaths.value
),
clean := {
val _ = clean.value
IvyActions.cleanCachedResolutionCache(ivyModule.value, streams.value.log)
},
cleanIvy := IvyActions.cleanCachedResolutionCache(ivyModule.value, streams.value.log),
clean := clean.dependsOn(cleanIvy).value,
scalaCompilerBridgeBinaryJar := None,
scalaCompilerBridgeSource := ZincLmUtil.getDefaultBridgeModule(scalaVersion.value),
)

View File

@ -195,6 +195,7 @@ object Keys {
val semanticdbOptions = settingKey[Seq[String]]("The Scalac options introduced for SemanticDB").withRank(CSetting)
val clean = taskKey[Unit]("Deletes files produced by the build, such as generated sources, compiled classes, and task caches.").withRank(APlusTask)
private[sbt] val cleanIvy = taskKey[Unit]("Deletes the ivy cached resolution")
val console = taskKey[Unit]("Starts the Scala interpreter with the project classes on the classpath.").withRank(APlusTask)
val consoleQuick = TaskKey[Unit]("consoleQuick", "Starts the Scala interpreter with the project dependencies on the classpath.", ATask, console)
val consoleProject = taskKey[Unit]("Starts the Scala interpreter with the sbt and the build definition on the classpath and useful imports.").withRank(AMinusTask)