import groovy.util.XmlParser
import groovy.xml.XmlUtil
import groovy.json.JsonBuilder
-import org.gradle.internal.hash.HashUtil
import com.vladsch.flexmark.util.ast.Node
import com.vladsch.flexmark.html.HtmlRenderer
import com.vladsch.flexmark.parser.Parser
import com.vladsch.flexmark.ext.autolink.AutolinkExtension
import com.vladsch.flexmark.ext.anchorlink.AnchorLinkExtension
import com.vladsch.flexmark.ext.toc.TocExtension
+import com.google.common.hash.HashCode
+import com.google.common.hash.Hashing
+import com.google.common.io.Files
buildscript {
repositories {
}
def getDataHash(File myFile) {
+ HashCode hash = Files.asByteSource(myFile).hash(Hashing.sha256())
return myFile.exists()
? [
"filename" : myFile.getName(),
"filesize" : myFile.length(),
- "sha256" : HashUtil.createHash(myFile, "SHA-256").asHexString()
+ "sha256" : hash.toString()
]
: null
}