From 0ca2d6a6944314f2d612d2be7f1cf8224035652d Mon Sep 17 00:00:00 2001 From: Edwin Jakobs Date: Thu, 30 Jun 2022 16:20:13 +0200 Subject: [PATCH] Skip over failing collectScreenshots tasks --- buildSrc/src/main/kotlin/CollectScreenShots.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/buildSrc/src/main/kotlin/CollectScreenShots.kt b/buildSrc/src/main/kotlin/CollectScreenShots.kt index d5663f1b..90e914cf 100644 --- a/buildSrc/src/main/kotlin/CollectScreenShots.kt +++ b/buildSrc/src/main/kotlin/CollectScreenShots.kt @@ -64,14 +64,16 @@ abstract class CollectScreenshotsTask @Inject constructor() : DefaultTask() { this.classpath += runtimeDependencies.get() this.mainClass.set(klassName) this.workingDir(project.rootProject.projectDir) - jvmArgs("-DtakeScreenshot=true", "-DscreenshotPath=${outputDir.get().asFile}/$klassName.png") + jvmArgs("-DtakeScreenshot=true", "-DscreenshotPath=${outputDir.get().asFile}/$klassName.png -Dorg.openrndr.exceptions=JVM") } } catch (e: NoSuchMethodException) { // silently ignore + } catch (e: Throwable) { + e.printStackTrace() } } } - // this is only executed if there are chances in the inputDir + // this is only executed if there are changes in the inputDir val runDemos = outputDir.get().asFile.listFiles { file: File -> file.extension == "png" }.map { it.nameWithoutExtension }.sorted()