outputs.dir("$helpOutputDir")
}
-def eclipseWorkspace
-task jalviewjsSetEclipseWorkspace {
- def eclipseWsDir = jalviewjs_eclipse_workspace
- eclipseWorkspace = file(eclipseWsDir)
- if (!eclipseWorkspace.exists()) {
- eclipseWorkspace = file("${buildDir}/../tmp/eclipse-workspace")
- //eclipseWorkspace.deleteOnExit()
- }
- println("ECLIPSE WORKSPACE: "+eclipseWorkspace.getPath())
-}
-
def jalviewjsBuildDir
def jalviewjsSiteDir
def jalviewjsTransferSiteDir
jalviewjsTransferSiteDir = jalviewjsBuildDir + "/tmp/site"
}
+def eclipseWorkspace
+task jalviewjsSetEclipseWorkspace {
+ def propKey = "jalviewjs_eclipse_workspace"
+ def propsFile = "${jalviewjsBuildDir}/${jalviewjs_eclipse_workspace_location_file}"
+ def props = new Properties()
+ def eclipseWsDir
+ def propVal = null
+ if (project.hasProperty(propKey)) {
+ propVal = project.getProperty(propKey)
+ eclipseWsDir = propVal
+ }
+ if ((eclipseWsDir == null || !file(eclipseWsDir).exists()) && file(propsFile).exists()) {
+ def ins = new FileInputStream(propsFile)
+ props.load(ins)
+ ins.close()
+ eclipseWsDir = props.getProperty(propKey)
+ }
+ if (eclipseWsDir == null || !file(eclipseWsDir).exists()) {
+ def tempDir = File.createTempDir()
+ eclipseWsDir = tempDir.getAbsolutePath()
+ props.setProperty(propKey, eclipseWsDir)
+ def outs = new FileOutputStream(propsFile)
+ props.store(outs, null)
+ outs.close()
+ }
+
+ eclipseWorkspace = file(eclipseWsDir)
+
+ println("ECLIPSE WORKSPACE: "+eclipseWorkspace.getPath())
+
+ inputs.property(propKey, propVal)
+ outputs.file(propsFile)
+}
task jalviewjsUnzipFiles {
eclipse_project_name = jalview
eclipse_bin_dir = bin
-jalviewjs_eclipse_root = ~/buildtools/eclipse/eclipse-jee-2019-09
+jalviewjs_eclipse_root = ~/buildtools/eclipse/eclipse-jee-2019-09/eclipse
jalviewjs_utils_dir = utils/jalviewjs
jalviewjs_eclipse_dropins_dir = eclipse/dropins
jalviewjs_j2s_subdir = swingjs/j2s
jalviewjs_j2s_settings_file = dot_j2s
jalviewjs_j2s_settings = .j2s
-jalviewjs_eclipse_workspace = ../tmp/eclipse-workspace
+#jalviewjs_eclipse_workspace = ../tmp/eclipse-workspace
+jalviewjs_eclipse_workspace_location_file = eclipse_workspace_location
#jalviewjs_eclipseBuildArg = build
jalviewjs_eclipseBuildArg = cleanBuild
jalviewjs_server_port = 9001