From a9f1ef0fbbde2933874f7b725520321a656f710c Mon Sep 17 00:00:00 2001 From: C10udburst <18114966+C10udburst@users.noreply.github.com> Date: Fri, 19 Aug 2022 16:10:03 +0200 Subject: [PATCH] ig one provider will always be without filesize because gradle is dogshit --- .../cloudstream3/gradle/tasks/MakePluginsJsonTask.kt | 10 +--------- .../com/lagradost/cloudstream3/gradle/tasks/Tasks.kt | 7 +------ 2 files changed, 2 insertions(+), 15 deletions(-) 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 8d6a042..e9efda4 100644 --- a/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/MakePluginsJsonTask.kt +++ b/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/MakePluginsJsonTask.kt @@ -21,15 +21,7 @@ abstract class MakePluginsJsonTask : DefaultTask() { val lst = LinkedList() for (subproject in project.allprojects) { - val cloudstream = subproject.extensions.findCloudstream() ?: continue - - /* - bruh why does gradle ignore task order - forcing me to do jank like this - */ - while (cloudstream.fileSize == null) { - Thread.sleep(100) - } + subproject.extensions.findCloudstream() ?: continue 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 6549aa6..4f87b3e 100644 --- a/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/Tasks.kt +++ b/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/Tasks.kt @@ -127,12 +127,7 @@ fun registerTasks(project: Project) { zip.destinationDirectory.set(project.buildDir) it.doLast { task -> - try { - extension.fileSize = task.outputs.files.singleFile.length() - } - catch(e: Throwable) { - extension.fileSize = -1L - } + extension.fileSize = task.outputs.files.singleFile.length() task.logger.lifecycle("Made Cloudstream package at ${task.outputs.files.singleFile}") } }