generate sha256 checksum

This commit is contained in:
Herr Ritschwumm
2016-03-04 13:56:17 +01:00
parent 5b1b2ef3d7
commit 6a8ec18f9a

View File

@@ -139,8 +139,14 @@ executableKey := {
val outputFile = workDir / warName
IO jar (contentMappings, outputFile, manifest)
// patch ChecksumHelper to allow sha256
val hack = classOf[ChecksumHelper] getDeclaredField "algorithms"
hack setAccessible true
val algos = (hack get null).asInstanceOf[java.util.Map[String,String]]
algos put ("sha256", "SHA-256")
// generate checksums
Seq("md5", "sha1") foreach { algorithm =>
Seq("md5", "sha1", "sha256") foreach { algorithm =>
IO.write(
workDir / (warName + "." + algorithm),
ChecksumHelper computeAsString (outputFile, algorithm)