}
def writeInstallersJsonFile(File installersOutputTxt, File installersSha256, File installersJsonFile) {
- if ((!installersOutputTxt.exists()) || (install4jCheckSums && (!installersSha256))) {
- throw new GradleException("One of the required input files doesn't exist.")
+ if (!installersOutputTxt.exists()) {
+ throw new GradleException("Required input file '${installersOutputTxt.getPath()}' doesn't exist.")
+ return null;
+ }
+ if (install4jCheckSums && (!installersSha256)) {
+ throw new GradleException("Required input file '${installersSha256.getPath()}' doesn't exist.")
return null;
}
def hash = [:]
line.replaceAll("\n","")
def vals = line.split("\t")
def filename = vals[3]
+ def filesize = file(filename).length()
filename = filename.replaceAll(/^.*\//, "")
- hash[vals[0]] = [ "id" : vals[0], "os" : vals[1], "name" : vals[2], "file" : filename ]
+ hash[vals[0]] = [ "id" : vals[0], "os" : vals[1], "name" : vals[2], "file" : filename, "filesize" : filesize ]
idHash."${filename}" = vals[0]
}
if (install4jCheckSums) {