From: Ben Soares Date: Fri, 8 Nov 2019 17:00:26 +0000 (+0000) Subject: JAL-3210 Add a local.properties ECLIPSE_IDE_DEVELOPER=true to prevent headless eclips... X-Git-Tag: Release_2_11_4_0~45^2~18^2~71 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=ccf06ac048c367e28d5e41a569bd95d5a2a77989;p=jalview.git JAL-3210 Add a local.properties ECLIPSE_IDE_DEVELOPER=true to prevent headless eclipse from running --- diff --git a/build.gradle b/build.gradle index a333e7d..fb24235 100644 --- a/build.gradle +++ b/build.gradle @@ -73,7 +73,6 @@ def libDistDir def compile_source_compatibility def compile_target_compatibility - ext { getdownWebsiteDir = "${jalviewDir}/${getdown_website_dir}/${JAVA_VERSION}" getdownDir = "" @@ -1639,6 +1638,13 @@ task jalviewjsProjectImport(type: Exec) { dependsOn jalviewjsEclipsePaths dependsOn jalviewjsEclipseSetup + doFirst { + // do not run a headless import when we claim to be in Eclipse + if (ECLIPSE_IDE_DEVELOPER.equals("true")) { + throw new StopExecutionException("Not running headless import whilst ECLIPSE_IDE_DEVELOPER is '"+ECLIPSE_IDE_DEVELOPER+"'") + } + } + //def projdir = eclipseWorkspace.getPath()+"/.metadata/.plugins/org.eclipse.core.resources/.projects/jalview/org.eclipse.jdt.core" def projdir = eclipseWorkspace.getPath()+"/.metadata/.plugins/org.eclipse.core.resources/.projects/jalview" executable(eclipseBinary) @@ -1660,6 +1666,13 @@ task jalviewjsTranspile(type: Exec) { dependsOn jalviewjsProjectImport dependsOn jalviewjsEclipsePaths + doFirst { + // do not run a headless transpile when we claim to be in Eclipse + if (ECLIPSE_IDE_DEVELOPER.equals("true")) { + throw new StopExecutionException("Not running headless transpile whilst ECLIPSE_IDE_DEVELOPER is '"+ECLIPSE_IDE_DEVELOPER+"'") + } + } + executable(eclipseBinary) args(["-nosplash", "--launcher.suppressErrors", "-application", "org.eclipse.jdt.apt.core.aptBuild", "-data", eclipseWorkspace, "-${jalviewjs_eclipse_build_arg}", eclipse_project_name ]) if (eclipseDebug) { @@ -1715,6 +1728,7 @@ DEBUG: ${eclipseDebug} doLast { 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}'") } } diff --git a/gradle.properties b/gradle.properties index 243ba26..03ec720 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ jalviewDir = . #JAVA_VERSION = 1.8 JAVA_VERSION = 11 -ECLIPSE_DEV = false +ECLIPSE_IDE_DEVELOPER = false sourceDir = src #sourceDir = utils/jalviewjs/test/src