JAL-3210 Added a flag to skip transpile errors, now like in Eclipse IDE. Will want...
[jalview.git] / build.gradle
index c451100..b461247 100644 (file)
@@ -1851,7 +1851,12 @@ DEBUG: ${eclipseDebug}
     if (stdout.toString().contains("Error processing ")) {
       // j2s did not complete transpile
       //throw new TaskExecutionException("Error during transpilation:\n${stderr}\nSee eclipse transpile log file '${jalviewDir}/${jalviewjsBuildDir}/${jalviewjs_j2s_transpile_stdout}'")
-      throw new GradleException("Error during transpilation:\n${stderr}\nSee eclipse transpile log file '${jalviewDir}/${jalviewjsBuildDir}/${jalviewjs_j2s_transpile_stdout}'")
+      if (jalviewjs_ignore_transpile_errors.equals("true")) {
+        println("IGNORING TRANSPILE ERRORS")
+        println("See eclipse transpile log file '${jalviewDir}/${jalviewjsBuildDir}/${jalviewjs_j2s_transpile_stdout}'")
+      } else {
+        throw new GradleException("Error during transpilation:\n${stderr}\nSee eclipse transpile log file '${jalviewDir}/${jalviewjsBuildDir}/${jalviewjs_j2s_transpile_stdout}'")
+      }
     }
   }