Save deterministic jar hash

Store the SHA-256 of the deterministic jar next to the generated binaries.
This commit is contained in:
cd2357 2021-02-01 19:25:50 +01:00
parent c03ff3c35c
commit b7188ecf72
No known key found for this signature in database
GPG key ID: F26C56748514D0D3

View file

@ -208,9 +208,15 @@ task packageInstallers {
// We convert the fat jar into a deterministic one by stripping out comments with date, etc.
// jar file created from https://github.com/ManfredKarrer/tools
executeCmd("sdf")
executeCmd("java -jar \"${project(':desktop').projectDir}/package/tools-1.0.jar\" ${fatJarFolderPath}/${mainJarName}")
// Store deterministic jar SHA-256
ant.checksum(file: "${fatJarFolderPath}/${mainJarName}", algorithm: 'SHA-256')
copy {
from "${fatJarFolderPath}/${mainJarName}.SHA-256"
into binariesFolderPath
}
// TODO For non-modular applications: use jlink to create a custom runtime containing only the modules required
// See jpackager argument documentation: