}
////
// Set JALVIEW_VERSION if it is not already set
- if (findProperty(JALVIEW_VERSION)==null || "".equals(JALVIEW_VERSION)) {
+ if (findProperty("JALVIEW_VERSION")==null || "".equals(JALVIEW_VERSION)) {
JALVIEW_VERSION = releaseProps.get("jalview.version")
}
jalviewjsTransferSiteSwingJsDir = string("${jalviewjsBuildDir}/tmp/${jalviewjs_site_dir}_swingjs")
jalviewjsTransferSiteCoreDir = string("${jalviewjsBuildDir}/tmp/${jalviewjs_site_dir}_core")
jalviewjsJalviewCoreHtmlFile = string("")
- jalviewjsJalviewCoreName = string(jalviewjs_core_name)
jalviewjsCoreClasslists = []
jalviewjsJalviewTemplateName = string(jalviewjs_name)
jalviewjsJ2sSettingsFileName = string("${jalviewDir}/${jalviewjs_j2s_settings}")
]
}
- // _jmol and _jalview cores. Add any other peculiar classlist.txt files here
- //classlistFiles += [ 'file': file("${jalviewDir}/${jalviewjs_classlist_jmol}"), 'name': "_jvjmol" ]
- classlistFiles += [ 'file': file("${jalviewDir}/${jalviewjs_classlist_jalview}"), 'name': jalviewjsJalviewCoreName ]
-
jalviewjsCoreClasslists = []
classlistFiles.each {
}
def list = fileTree(dir: j2sDir, includes: filelist)
- def jsfile = "${outputDir}/core${name}.js"
- def zjsfile = "${outputDir}/core${name}.z.js"
+ def jsfile = "${outputDir}/core_${name}.js"
+ def zjsfile = "${outputDir}/core_${name}.z.js"
jalviewjsCoreClasslists += [
'jsfile': jsfile,
outputs.file(zjsfile)
}
- // _stevesoft core. add any cores without a classlist here (and the inputs and outputs)
- def stevesoftClasslistName = "_stevesoft"
- def stevesoftClasslist = [
- 'jsfile': "${outputDir}/core${stevesoftClasslistName}.js",
- 'zjsfile': "${outputDir}/core${stevesoftClasslistName}.z.js",
- 'list': fileTree(dir: j2sDir, include: "com/stevesoft/pat/**/*.js"),
- 'name': stevesoftClasslistName
- ]
- jalviewjsCoreClasslists += stevesoftClasslist
- inputs.files(stevesoftClasslist['list'])
- outputs.file(stevesoftClasslist['jsfile'])
- outputs.file(stevesoftClasslist['zjsfile'])
-
// _all core
- def allClasslistName = "_all"
+ def allClasslistName = "all"
def allJsFiles = fileTree(dir: j2sDir, include: "**/*.js")
allJsFiles += fileTree(
dir: libJ2sDir,
]
)
def allClasslist = [
- 'jsfile': "${outputDir}/core${allClasslistName}.js",
- 'zjsfile': "${outputDir}/core${allClasslistName}.z.js",
+ 'jsfile': "${outputDir}/core_${allClasslistName}.js",
+ 'zjsfile': "${outputDir}/core_${allClasslistName}.z.js",
'list': allJsFiles,
'name': allClasslistName
]
if (eclipseHome == null || ! IN_ECLIPSE) {
throw new StopExecutionException("Cannot find running Eclipse home from System.properties['eclipse.home.location']. Skipping J2S Plugin Check.")
}
- def eclipseJ2sPlugin = "${eclipseHome}/dropins/${j2sPluginFile.getName()}"
- def eclipseJ2sPluginFile = file(eclipseJ2sPlugin)
- if (!eclipseJ2sPluginFile.exists()) {
- def msg = "Eclipse J2S Plugin is not installed (could not find '${eclipseJ2sPlugin}')\nTry running task jalviewjsIDE_copyJ2sPlugin"
+ def eclipseJ2sPluginDirs = [ "${eclipseHome}/dropins" ]
+ def altPluginsDir = System.properties["org.eclipse.equinox.p2.reconciler.dropins.directory"]
+ if (altPluginsDir != null && file(altPluginsDir).exists()) {
+ eclipseJ2sPluginDirs += altPluginsDir
+ }
+ def foundPlugin = false
+ def j2sPluginFileName = j2sPluginFile.getName()
+ def eclipseJ2sPlugin
+ def eclipseJ2sPluginFile
+ eclipseJ2sPluginDirs.any { dir ->
+ eclipseJ2sPlugin = "${dir}/${j2sPluginFileName}"
+ eclipseJ2sPluginFile = file(eclipseJ2sPlugin)
+ if (eclipseJ2sPluginFile.exists()) {
+ foundPlugin = true
+ return true
+ }
+ }
+ if (!foundPlugin) {
+ def msg = "Eclipse J2S Plugin is not installed (could not find '${j2sPluginFileName}' in\n"+eclipseJ2sPluginDirs.join("\n")+"\n)\nTry running task jalviewjsIDE_copyJ2sPlugin"
System.err.println(msg)
throw new StopExecutionException(msg)
}
System.err.println(msg)
throw new StopExecutionException(msg)
} else {
- def msg = "Eclipse J2S Plugin is the same as '${j2sPlugin}' (this is good)"
+ def msg = "Eclipse J2S Plugin '${eclipseJ2sPlugin}' is the same as '${j2sPlugin}' (this is good)"
println(msg)
}
}