Make the stopship task more reliable.

This commit is contained in:
Greyson Parrelli
2025-03-27 10:25:05 -04:00
parent 857306d7a3
commit bde791e03e

View File

@@ -3,6 +3,7 @@ import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.async import kotlinx.coroutines.async
import kotlinx.coroutines.awaitAll import kotlinx.coroutines.awaitAll
import kotlinx.coroutines.runBlocking import kotlinx.coroutines.runBlocking
import java.io.FileNotFoundException
plugins { plugins {
alias(libs.plugins.android.application) apply false alias(libs.plugins.android.application) apply false
@@ -143,9 +144,13 @@ tasks.register("checkStopship") {
runBlocking { runBlocking {
allFiles.map { file -> allFiles.map { file ->
scope.async { scope.async {
try {
if (file.readText().contains("STOPSHIP")) { if (file.readText().contains("STOPSHIP")) {
stopshipFiles += file.relativeTo(cachedProjectDir).path stopshipFiles += file.relativeTo(cachedProjectDir).path
} }
} catch (e: FileNotFoundException) {
// Ignore
}
} }
} }
.awaitAll() .awaitAll()