I think you cannot change the name of the generated artifact just for the universal:packageBin
easily.
You can change the name of the generated artifact globally, by using artifactName
.
artifactName := { (sv: ScalaVersion, module: ModuleID, artifact: Artifact) =>
artifact.name + module.revision + "_dist." + artifact.extension
}
This will however also modify also the name of the generated jar file, and perhaps some other names of the generated artifacts.
If you wanted to change the name only of the file generated by the universal:packageBin
you could rename the file after it was generated. Sbt gives you utilities which make this rather easy.
Universal / packageBin := {
val originalFileName = (Universal / packageBin).value
val (base, ext) = originalFileName.baseAndExt
val newFileName = file(originalFileName.getParent) / (base + "_dist." + ext)
IO.move(originalFileName, newFileName)
newFileName
}
Now invoking the Universal/packageBin
should execute your new task, which will rename the file after it's created.