From dda0407943edf42c3ad816d9ec9a30ba1ba2b921 Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Fri, 9 Jun 2023 17:32:34 +0100 Subject: [PATCH] JAL-3599 Make jalviewjs dependOn jalviewjsLaunchTest. Change jalviewjsLaunchTest to only stop the task (not trigger a failure) if chrome not found. Remove deliberate NPE. --- build.gradle | 19 ++++++++++--------- src/jalview/gui/Desktop.java | 4 ---- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/build.gradle b/build.gradle index e0c80e3..f2aced5 100644 --- a/build.gradle +++ b/build.gradle @@ -4203,13 +4203,6 @@ task eclipseAutoBuildTask { } -task jalviewjs { - group "JalviewJS" - description "Build the site" - dependsOn jalviewjsBuildSite -} - - task jalviewjsCopyStderrLaunchFile(type: Copy) { from file(jalviewjs_stderr_launch) into jalviewjsSiteDir @@ -4248,7 +4241,7 @@ task jalviewjsLaunchTest(type: Exec) { doFirst { def exec = file(chromiumBinary) if (!exec.exists()) { - throw new GradleException("Could not find chromium binary '${chromiumBinary}'. Cannot run task ${name}.") + throw new StopExecutionException("Could not find chromium binary '${chromiumBinary}'. Cannot run task ${name}.") } stdout = new ByteArrayOutputStream() @@ -4292,5 +4285,13 @@ task jalviewjsLaunchTest(type: Exec) { if (!found) { throw new GradleException("Could not find evidence of Desktop launch in JalviewJS.") } - } + } +} + + +task jalviewjs { + group "JalviewJS" + description "Build the JalviewJS site and run the launch test" + dependsOn jalviewjsBuildSite + dependsOn jalviewjsLaunchTest } diff --git a/src/jalview/gui/Desktop.java b/src/jalview/gui/Desktop.java index 1a21006..2dfe820 100644 --- a/src/jalview/gui/Desktop.java +++ b/src/jalview/gui/Desktop.java @@ -626,10 +626,6 @@ public class Desktop extends jalview.jbgui.GDesktop if (Platform.isJS()) { - // emulate a problem - String a = null; - int l = a.length(); - // used for jalviewjsTest jalview.bin.Console.info("JALVIEWJS: CREATED DESKTOP"); } -- 1.7.10.2