ig one provider will always be without filesize because gradle is dogshit

This commit is contained in:
C10udburst 2022-08-19 16:10:03 +02:00
parent 26c1af5710
commit a9f1ef0fbb
2 changed files with 2 additions and 15 deletions

View file

@ -21,15 +21,7 @@ abstract class MakePluginsJsonTask : DefaultTask() {
val lst = LinkedList<PluginEntry>()
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())
}

View file

@ -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}")
}
}