diff --git a/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/MakePluginsJsonTask.kt b/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/MakePluginsJsonTask.kt index 903333b..8d6a042 100644 --- a/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/MakePluginsJsonTask.kt +++ b/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/MakePluginsJsonTask.kt @@ -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()) diff --git a/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/Tasks.kt b/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/Tasks.kt index 4f87b3e..be191ac 100644 --- a/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/Tasks.kt +++ b/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/Tasks.kt @@ -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 + } + } } }