JAL-3210 Added a flag to skip transpile errors, now like in Eclipse IDE. Will want...
[jalview.git] / build.gradle
index 1d9813a..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}'")
+      }
     }
   }
 
@@ -2045,7 +2050,8 @@ task jalviewjsBuildAllCores {
     'list': allJsFiles,
     'name': allClasslistName
   ]
-  jalviewjsCoreClasslists += allClasslist
+  // not including this version of "all" core at the moment
+  //jalviewjsCoreClasslists += allClasslist
   inputs.files(allClasslist['list'])
   outputs.file(allClasslist['jsfile'])
   outputs.file(allClasslist['zjsfile'])
@@ -2303,8 +2309,8 @@ task jalviewjsIDE_checkJ2sPlugin {
     def eclipseJ2sPlugin = "${eclipseHome}/dropins/${j2sPluginFile.getName()}"
     def eclipseJ2sPluginFile = file(eclipseJ2sPlugin)
     if (!eclipseJ2sPluginFile.exists()) {
-      def msg = "Eclipse J2S Plugin is not installed"
-      println(msg)
+      def msg = "Eclipse J2S Plugin is not installed (could not find '${eclipseJ2sPlugin}')"
+      System.err.println(msg)
       if (! copyPlugin) {
         throw new GradleException(msg)
       }
@@ -2321,7 +2327,7 @@ task jalviewjsIDE_checkJ2sPlugin {
      
     if (j2sPluginMd5 != eclipseJ2sPluginMd5) {
       def msg = "WARNING! Eclipse J2S Plugin '${eclipseJ2sPlugin}' is different to this commit's version '${j2sPlugin}'"
-      println(msg)
+      System.err.println(msg)
       if (! copyPlugin) {
         throw new StopExecutionException(msg)
       }
@@ -2337,7 +2343,7 @@ task jalviewjsIDE_checkJ2sPlugin {
         into eclipseJ2sPluginFile.getParent()
       }
     } else {
-      def msg = "Eclipse J2S Plugin is the same as '${j2sPlugin}'"
+      def msg = "Eclipse J2S Plugin is the same as '${j2sPlugin}' (this is good)"
       println(msg)
     }
   }