This commit is contained in:
C10udburst 2022-08-19 15:23:16 +02:00
parent de10dccb38
commit 18915372d0
2 changed files with 6 additions and 4 deletions

View File

@ -27,12 +27,8 @@ abstract class MakePluginsJsonTask : DefaultTask() {
bruh why does gradle ignore task order
forcing me to do jank like this
*/
var timeout = 10000 // 10 s timeout
while (cloudstream.fileSize == null) {
Thread.sleep(100)
timeout -= 100
if (timeout <= 0)
throw RuntimeException("Timeout while fetching fileSize for ${subproject.name}")
}
lst.add(subproject.makePluginEntry())

View File

@ -130,6 +130,12 @@ fun registerTasks(project: Project) {
extension.fileSize = task.outputs.files.singleFile.length()
task.logger.lifecycle("Made Cloudstream package at ${task.outputs.files.singleFile}")
}
it.finalizedBy {
if (extension.fileSize == null) {
extension.fileSize = -1L
}
}
}
}