X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=build.gradle;h=e6a9c34edab94d622727c04243dd02c706f4abfd;hb=a3b8fa7024e7034866f6fe6c18c53177fa31c414;hp=fc13bff65e4d8886db78cf664fd2829ecb652aae;hpb=47933804578c000492a8f6f84a45d7bc6000315b;p=jalview.git diff --git a/build.gradle b/build.gradle index fc13bff..e6a9c34 100644 --- a/build.gradle +++ b/build.gradle @@ -143,6 +143,11 @@ ext { getdown_app_dir = getdown_app_dir_release buildProperties = string("${resourceDir}/${build_properties_file}") reportRsyncCommand = true + // Don't ignore transpile errors for release build + if (jalviewjs_ignore_transpile_errors.equals("true")) { + jalviewjs_ignore_transpile_errors = "false" + println("Setting jalviewjs_ignore_transpile_errors to 'false'") + } break case "ARCHIVE": @@ -194,6 +199,11 @@ ext { getdown_app_dir = getdown_app_dir_alt buildProperties = string("${resourceDir}/${build_properties_file}") reportRsyncCommand = true + // Don't ignore transpile errors for release build + if (jalviewjs_ignore_transpile_errors.equals("true")) { + jalviewjs_ignore_transpile_errors = "false" + println("Setting jalviewjs_ignore_transpile_errors to 'false'") + } break case ~/^SCRATCH(|-[-\w]*)$/: @@ -518,6 +528,7 @@ eclipse { javaRuntimeName = eclipse_java_runtime_name // add in jalview project specific properties/preferences into eclipse core preferences + // and also the codestyle XML file file { withProperties { props -> def jalview_prefs = new Properties() @@ -529,6 +540,22 @@ eclipse { props.putAt(t, v) } } + // codestyle file -- overrides previous formatter prefs + def csFile = file("${jalviewDirAbsolutePath}/${eclipse_codestyle_file}") + if (csFile.exists()) { + XmlParser parser = new XmlParser() + def profiles = parser.parse(csFile) + def profile = profiles.'profile'.find { p -> (p.'@kind' == "CodeFormatterProfile" && p.'@name' == "Jalview") } + if (profile != null) { + profile.'setting'.each { s -> + def id = s.'@id' + def value = s.'@value' + if (id != null && value != null) { + props.putAt(id, value) + } + } + } + } } } @@ -1851,7 +1878,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}'") + } } } @@ -2304,8 +2336,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) } @@ -2322,7 +2354,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) } @@ -2338,7 +2370,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) } }