From bde791e03ed3d90a708ac7386561ddfb66c569ce Mon Sep 17 00:00:00 2001 From: Greyson Parrelli Date: Thu, 27 Mar 2025 10:25:05 -0400 Subject: [PATCH] Make the stopship task more reliable. --- build.gradle.kts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 9c7a88dadb..3215ec6220 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -3,6 +3,7 @@ import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.async import kotlinx.coroutines.awaitAll import kotlinx.coroutines.runBlocking +import java.io.FileNotFoundException plugins { alias(libs.plugins.android.application) apply false @@ -143,8 +144,12 @@ tasks.register("checkStopship") { runBlocking { allFiles.map { file -> scope.async { - if (file.readText().contains("STOPSHIP")) { - stopshipFiles += file.relativeTo(cachedProjectDir).path + try { + if (file.readText().contains("STOPSHIP")) { + stopshipFiles += file.relativeTo(cachedProjectDir).path + } + } catch (e: FileNotFoundException) { + // Ignore } } }