From 4a48749336819d5cba94231ee6e71144321b8ef1 Mon Sep 17 00:00:00 2001 From: Eric Peters Date: Tue, 21 Sep 2021 19:34:11 -0700 Subject: [PATCH] Don't set default withAssemblyUnzipDirectory & use withAssemblyDirectory as fallback --- src/main/scala/sbtassembly/Assembly.scala | 2 +- src/main/scala/sbtassembly/AssemblyPlugin.scala | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/scala/sbtassembly/Assembly.scala b/src/main/scala/sbtassembly/Assembly.scala index 82330d16..c482e732 100644 --- a/src/main/scala/sbtassembly/Assembly.scala +++ b/src/main/scala/sbtassembly/Assembly.scala @@ -218,7 +218,7 @@ object Assembly { def assembleMappings(classpath: Classpath, dependencies: Classpath, ao: AssemblyOption, log: Logger): Vector[MappingSet] = { val assemblyDir = ao.assemblyDirectory.get - val assemblyUnzipDir = ao.assemblyUnzipDirectory.get + val assemblyUnzipDir = (ao.assemblyUnzipDirectory orElse ao.assemblyDirectory).get if (!ao.cacheOutput) IO.delete(assemblyDir) if (!ao.cacheUnzip) IO.delete(assemblyUnzipDir) diff --git a/src/main/scala/sbtassembly/AssemblyPlugin.scala b/src/main/scala/sbtassembly/AssemblyPlugin.scala index 37d1c20e..d52922c4 100644 --- a/src/main/scala/sbtassembly/AssemblyPlugin.scala +++ b/src/main/scala/sbtassembly/AssemblyPlugin.scala @@ -112,7 +112,6 @@ object AssemblyPlugin extends sbt.AutoPlugin { val s = streams.value AssemblyOption() .withAssemblyDirectory(s.cacheDirectory / "assembly") - .withAssemblyUnzipDirectory(s.cacheDirectory / "assembly") .withIncludeBin((assembleArtifact in packageBin).value) .withIncludeScala((assembleArtifact in assemblyPackageScala).value) .withIncludeDependency((assembleArtifact in assemblyPackageDependency).value)