X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=build.gradle;h=147c31ad165b3db3373ef61cfd674a2bfec04deb;hb=5150133eed3d978727552434fe6fe7e0ff335370;hp=0be087f0e18c3883ef9f7e18e1732aaf87d396ec;hpb=762f874a3fb43e5b56250a33154d3f37872360b8;p=jalview.git diff --git a/build.gradle b/build.gradle index 0be087f..147c31a 100644 --- a/build.gradle +++ b/build.gradle @@ -110,7 +110,7 @@ ext { } //// // 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") } @@ -457,7 +457,6 @@ ext { 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}") @@ -2523,10 +2522,6 @@ task jalviewjsBuildAllCores { ] } - // _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 { @@ -2549,8 +2544,8 @@ task jalviewjsBuildAllCores { } 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, @@ -2565,21 +2560,8 @@ task jalviewjsBuildAllCores { 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, @@ -2602,8 +2584,8 @@ task jalviewjsBuildAllCores { ] ) 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 ] @@ -2861,10 +2843,25 @@ task jalviewjsIDE_checkJ2sPlugin { 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) } @@ -2882,7 +2879,7 @@ task jalviewjsIDE_checkJ2sPlugin { 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) } }