ok ig lets try this

This commit is contained in:
C10udburst 2022-08-19 15:28:29 +02:00
parent 18915372d0
commit e46204f939
1 changed files with 5 additions and 6 deletions

View File

@ -127,14 +127,13 @@ fun registerTasks(project: Project) {
zip.destinationDirectory.set(project.buildDir)
it.doLast { task ->
extension.fileSize = task.outputs.files.singleFile.length()
task.logger.lifecycle("Made Cloudstream package at ${task.outputs.files.singleFile}")
}
it.finalizedBy {
if (extension.fileSize == null) {
try {
extension.fileSize = task.outputs.files.singleFile.length()
}
catch(Exception e) {
extension.fileSize = -1L
}
task.logger.lifecycle("Made Cloudstream package at ${task.outputs.files.singleFile}")
}
}
}