Nothing implemented by default as far as I know. However, you can use SBT's FileUtilities.
Try playing around with the following example, which copies your artifact jar into a tmp dir, zips the dir, and deletes it. It should be straightforward to extend it to dependent libs.
class project(info: ProjectInfo) extends DefaultProject(info) {
def distPath = {
((outputPath ##) / defaultJarName) +++ mainDependencies.scalaJars
}
private def str2path(str: String): Path = str
lazy val dist = task {
FileUtilities.copyFile((outputPath ##) / defaultJarName, "tmp" / "lib" / defaultJarName, log)
FileUtilities.zip(List(str2path("tmp")), "dist.zip", true, log)
FileUtilities.clean("tmp", log)
None
}
}
The following functions from FileUtilities
were used above:
def zip(sources: Iterable[Path], outputZip: Path, recursive: Boolean, log: Logger)
def copyFile(sourceFile: Path, targetFile: Path, log: Logger): Option[String]
def clean(file: Path, log: Logger): Option[String]
Their declarations should be self-explanatory.