From 7e77d166c669a529c8ead4e47b2d94efc2e348fc Mon Sep 17 00:00:00 2001 From: Josh Suereth Date: Mon, 10 Mar 2014 10:44:38 -0400 Subject: [PATCH] Fix overwrite default to true in deprecated method calls. We cannot break existing users, but we can deprecate the improper usage. This is part #2 of the workaround for #1156. This ensures that users will stop using the legacy methods after 0.13.2 is out. --- main/src/main/scala/sbt/Defaults.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main/src/main/scala/sbt/Defaults.scala b/main/src/main/scala/sbt/Defaults.scala index 4655786067..1e9eb7a3dc 100755 --- a/main/src/main/scala/sbt/Defaults.scala +++ b/main/src/main/scala/sbt/Defaults.scala @@ -1213,8 +1213,9 @@ object Classpaths def deliverConfig(outputDirectory: File, status: String = "release", logging: UpdateLogging.Value = UpdateLogging.DownloadOnly) = new DeliverConfiguration(deliverPattern(outputDirectory), status, None, logging) + @deprecated("0.13.2", "Previous semantics allowed overwriting cached files, which was unsafe. Please specify overwrite parameter.") def publishConfig(artifacts: Map[Artifact, File], ivyFile: Option[File], checksums: Seq[String], resolverName: String, logging: UpdateLogging.Value): PublishConfiguration = - publishConfig(artifacts, ivyFile, checksums, resolverName, logging, overwrite = false) + publishConfig(artifacts, ivyFile, checksums, resolverName, logging, overwrite = true) def publishConfig(artifacts: Map[Artifact, File], ivyFile: Option[File], checksums: Seq[String], resolverName: String = "local", logging: UpdateLogging.Value = UpdateLogging.DownloadOnly, overwrite: Boolean = false) = new PublishConfiguration(ivyFile, resolverName, artifacts, checksums, logging, overwrite)