1 import org.apache.tools.ant.filters.ReplaceTokens
2 import org.gradle.internal.os.OperatingSystem
3 import org.gradle.plugins.ide.eclipse.model.*
4 import groovy.transform.ExternalizeMethods
5 import com.diffplug.gradle.GoomphCacheLocations
21 id 'com.diffplug.gradle.oomph.ide' version '3.18.1'
22 id 'com.diffplug.gradle.equinoxlaunch' version '3.18.1'
23 id 'com.diffplug.gradle.eclipse.mavencentral' version '3.18.1'
24 id 'com.diffplug.gradle.p2.asmaven' version '3.18.1'
27 def jalviewDirAbsolutePath = file(jalviewDir).getAbsolutePath()
42 group 'eclipseDeps', {
43 repoEclipse goomph_eclipse_repo_version
44 //slicingOption 'latestVersionOnly', 'true'
45 iu 'org.eclipse.update.configurator'
47 group 'eclipseOrbit', {
48 repo goomph_orbit_repo
49 slicingOption 'latestVersionOnly', 'true'
52 iu 'javax.servlet.jsp'
54 iu 'org.apache.batik.constants'
55 iu 'org.apache.batik.css'
56 iu 'org.apache.batik.i18n'
57 iu 'org.apache.batik.util'
58 iu 'org.apache.commons.beanutils'
59 iu 'org.apache.commons.collections'
60 iu 'org.apache.commons.jxpath'
61 iu 'org.apache.commons.io'
62 iu 'org.apache.commons.logging'
63 iu 'org.apache.xmlgraphics'
65 iu 'org.w3c.dom.events'
73 source.addMaven('org.eclipse.platform:org.eclipse.osgi:3.14.0')
75 compile 'eclipseOrbit:org.apache.ant:1.10.5.v20190526-1402'
77 compile 'org.osgi:org.osgi.service.component:1.4.0'
81 jalviewjsIde name: 'net.sf.j2s.core-3.2.4'
82 jalviewjsIde name: 'com.seeq.eclipse.importprojects-1.4.0'
92 // How do I add these to the jalviewjsIde configuration and not the compile configuration?
93 release goomph_eclipse_repo_version, {
95 //def platformCode="cocoa.macosx.x86_64"
96 //compile 'org.eclipse.swt.'+platformCode
97 useNativesForRunningPlatform()
98 compile 'org.eclipse.swt'
100 compile 'org.eclipse.ant.core'
101 compile 'org.eclipse.compare.core'
102 compile 'org.eclipse.core.commands'
103 compile 'org.eclipse.core.contenttype'
104 compile 'org.eclipse.core.jobs'
105 compile 'org.eclipse.core.expressions'
106 compile 'org.eclipse.core.filesystem'
107 compile 'org.eclipse.core.resources'
108 compile 'org.eclipse.core.runtime'
109 compile 'org.eclipse.core.variables'
110 compile 'org.eclipse.equinox.common'
111 compile 'org.eclipse.equinox.ds'
112 compile 'org.eclipse.equinox.app'
113 compile 'org.eclipse.equinox.registry'
114 compile 'org.eclipse.equinox.preferences'
115 compile 'org.eclipse.jface'
116 compile 'org.eclipse.osgi'
117 compile 'org.eclipse.osgi.services'
118 compile 'org.eclipse.ui'
119 compile 'org.eclipse.ui.workbench'
120 compile 'org.eclipse.team.core'
121 compile 'org.eclipse.text'
123 compile 'org.eclipse.e4.core.commands'
124 compile 'org.eclipse.e4.core.contexts'
125 compile 'org.eclipse.e4.core.di'
126 compile 'org.eclipse.e4.core.di.annotations'
127 compile 'org.eclipse.e4.core.di.extensions.supplier'
128 compile 'org.eclipse.e4.core.services'
129 compile 'org.eclipse.e4.ui.bindings'
130 compile 'org.eclipse.e4.ui.model.workbench'
131 compile 'org.eclipse.e4.ui.workbench'
132 compile 'org.eclipse.e4.ui.workbench.swt'
133 compile 'org.eclipse.e4.ui.css.core'
134 compile 'org.eclipse.e4.ui.css.swt'
135 compile 'org.eclipse.e4.ui.css.swt.theme'
136 compile 'org.eclipse.e4.ui.services'
137 compile 'org.eclipse.e4.ui.di'
139 //compile 'org.eclipse.e4.core.di.internal.extensions'
141 // org.eclipse.update.configurator deliberately kept at 3.3.400 see https://github.com/diffplug/goomph/issues/69
142 //compile 'org.eclipse.update.configurator'
159 mainClassName = launcherClass
160 def classes = "$jalviewDir/$classesDir"
162 // configure classpath/args for j8/j11 compilation
166 def compile_source_compatibility
167 def compile_target_compatibility
170 buildProperties = jalviewDir + "/" + classesDir +"/" + buildPropertiesFile
178 def JAVA_INTEGER_VERSION
179 //def additional_compiler_args = []
180 // this property is for the Java library used in eclipse
181 def eclipse_java_runtime_name
182 if (JAVA_VERSION.equals("1.8")) {
183 JAVA_INTEGER_VERSION = "8"
186 libDistDir = j8libDir
187 compile_source_compatibility = 1.8
188 compile_target_compatibility = 1.8
189 eclipse_java_runtime_name = "JavaSE-1.8"
190 } else if (JAVA_VERSION.equals("11")) {
191 JAVA_INTEGER_VERSION = "11"
193 libDistDir = j11libDir
194 compile_source_compatibility = 11
195 compile_target_compatibility = 11
196 eclipse_java_runtime_name = "JavaSE-11"
197 /* compile without modules -- using classpath libraries
198 additional_compiler_args += [
199 '--module-path', ext.modules_compileClasspath.asPath,
200 '--add-modules', j11modules
203 } else if (JAVA_VERSION.equals("12") || JAVA_VERSION.equals("13")) {
204 JAVA_INTEGER_VERSION = JAVA_VERSION
206 libDistDir = j11libDir
207 compile_source_compatibility = JAVA_VERSION
208 compile_target_compatibility = JAVA_VERSION
209 eclipse_java_runtime_name = "JavaSE-11"
210 /* compile without modules -- using classpath libraries
211 additional_compiler_args += [
212 '--module-path', ext.modules_compileClasspath.asPath,
213 '--add-modules', j11modules
217 throw new GradleException("JAVA_VERSION=$JAVA_VERSION not currently supported by Jalview")
225 srcDirs "$jalviewDir/$sourceDir"
226 outputDir = file("$classes")
230 srcDirs "$jalviewDir/$resourceDir"
233 compileClasspath = files(sourceSets.main.java.outputDir)
234 compileClasspath += fileTree(dir: "$jalviewDir/$libDir", include: ["*.jar"])
236 runtimeClasspath = compileClasspath
243 name = eclipse_project_name
245 natures 'org.eclipse.jdt.core.javanature',
246 'org.eclipse.buildship.core.gradleprojectnature'
248 buildCommand 'org.eclipse.jdt.core.javabuilder'
249 buildCommand 'org.eclipse.buildship.core.gradleprojectbuilder'
253 //defaultOutputDir = sourceSets.main.java.outputDir
255 configurations.each{ if (it.isCanBeResolved()) {
260 minusConfigurations += removeThese
261 plusConfigurations = [ ]
265 def removeTheseToo = []
266 HashMap<String, Boolean> addedSrcPath = new HashMap<>();
267 cp.entries.each { entry ->
268 if (entry.kind == 'src') {
269 if (addedSrcPath.getAt(entry.path) || !(entry.path == "src" || entry.path == "test")) {
270 removeTheseToo += entry
272 addedSrcPath.putAt(entry.path, true)
276 cp.entries.removeAll(removeTheseToo)
278 if (file(eclipse_bin_dir+"/main").isDirectory()) {
279 cp.entries += new Output(eclipse_bin_dir+"/main")
281 if (file(helpParentDir).isDirectory()) {
282 cp.entries += new Library(fileReference(helpParentDir))
284 if (file(resourceDir).isDirectory()) {
285 cp.entries += new Library(fileReference(resourceDir))
288 HashMap<String, Boolean> addedLibPath = new HashMap<>();
290 // changing from sourcesets.main.classpath to specific Java version lib
291 //sourceSets.main.compileClasspath.each{
292 fileTree("$jalviewDir/$libDistDir").include("**/*.jar").include("*.jar").each {
293 //don't want to add outputDir as eclipse is using its own output dir in bin/main
294 if (it.isDirectory() || ! it.exists()) {
295 // don't add dirs to classpath
298 def itPath = it.toString()
299 if (itPath.startsWith(jalviewDirAbsolutePath+"/")) {
300 itPath = itPath.substring(jalviewDirAbsolutePath.length()+1)
302 if (addedLibPath.get(itPath)) {
303 //println("Not adding duplicate entry "+itPath)
305 //println("Adding entry "+itPath)
306 cp.entries += new Library(fileReference(itPath))
307 addedLibPath.put(itPath, true)
314 containers 'org.eclipse.buildship.core.gradleclasspathcontainer'
318 // for the IDE, use java 11 compatibility
319 sourceCompatibility = compile_source_compatibility
320 targetCompatibility = compile_target_compatibility
321 javaRuntimeName = eclipse_java_runtime_name
325 withProperties { props ->
326 def jalview_prefs = new Properties()
327 def ins = new FileInputStream(jalviewDirAbsolutePath+"/"+eclipse_extra_jdt_prefs_file)
328 jalview_prefs.load(ins)
330 jalview_prefs.forEach { t, v ->
331 if (props.getAt(t) == null) {
340 //synchronizationTasks eclipseClasspath
341 //autoBuildTasks eclipseClasspath
348 sourceCompatibility = compile_source_compatibility
349 targetCompatibility = compile_target_compatibility
350 //options.compilerArgs = additional_compiler_args
351 print ("Setting target compatibility to "+targetCompatibility+"\n")
357 delete sourceSets.main.java.outputDir
380 def useIde = useGoomph.equals("true")
383 task jalviewjsSetEclipseWorkspace {
384 def eclipseWsDir = useIde?goomph_workspace:jalviewjs_eclipse_workspace
385 eclipseWorkspace = file(eclipseWsDir)
386 if (!eclipseWorkspace.exists()) {
387 eclipseWorkspace = file("${buildDir}/tmp/eclipse-workspace")
388 //eclipseWorkspace.deleteOnExit()
390 GoomphCacheLocations.override_workspaces = file(eclipseWorkspace.getAbsolutePath())
391 eclipseWorkspace = oomphIde.workspaceRegistry.workspaceDir(project, file(oomphIde.ideDir))
393 println("ECLIPSE WORKSPACE: "+eclipseWorkspace.getPath())
397 repoEclipse goomph_eclipse_version
402 //executionEnvironments = [ eclipse.jdt.javaRuntimeName ]
405 //compilerComplianceLevel( JAVA_INTEGER_VERSION )
408 repo "https://download.eclipse.org/releases/${goomph_eclipse_version_name}/"
409 feature goomph_eclipse_jee_feature, goomph_eclipse_jee_version
411 //iu 'org.eclipse.osgi'
415 repo goomph_repo_buildship
416 feature goomph_feature_buildship
427 ideJalviewjsBuildSetup {
429 source.addConfiguration(configurations.compile)
430 source.addConfiguration(configurations.jalviewjsIde)
432 source.addMaven('eclipseOrbit:org.apache.ant:1.10.5.v20190526-1402')
433 source.addMaven('eclipseOrbit:javax.servlet:3.1.0.v201410161800')
434 source.addMaven('eclipseOrbit:javax.servlet.jsp:2.2.0.v201112011158')
435 source.addMaven('eclipseOrbit:javax.el:2.2.0.v201303151357')
436 source.addMaven('eclipseOrbit:org.apache.batik.constants:1.11.0.v20190515-0436')
437 source.addMaven('eclipseOrbit:org.apache.batik.css:1.11.0.v20190515-0436')
438 source.addMaven('eclipseOrbit:org.apache.batik.i18n:1.11.0.v20190515-0436')
439 source.addMaven('eclipseOrbit:org.apache.batik.util:1.11.0.v20190515-0436')
440 source.addMaven('eclipseOrbit:org.apache.commons.beanutils:1.8.0.v201205091237')
441 source.addMaven('eclipseOrbit:org.apache.commons.collections:3.2.2.v201511171945')
442 source.addMaven('eclipseOrbit:org.apache.xmlgraphics:2.3.0.v20190515-0436')
443 source.addMaven('eclipseOrbit:org.apache.commons.jxpath:1.3.0.v200911051830')
444 source.addMaven('eclipseOrbit:org.apache.commons.io:2.6.0.v20190123-2029')
445 source.addMaven('eclipseOrbit:org.apache.commons.logging:1.2.0.v20180409-1502')
446 source.addMaven('eclipseOrbit:org.jdom:1.1.1.v201101151400')
447 source.addMaven('eclipseOrbit:org.w3c.dom.svg:1.1.0.v201011041433')
448 source.addMaven('eclipseOrbit:org.w3c.dom.smil:1.0.1.v200903091627')
449 source.addMaven('eclipseOrbit:org.w3c.dom.events:3.0.0.draft20060413_v201105210656')
450 source.addMaven('org.eclipse.birt.runtime:com.ibm.icu:56.1.0.v201601250100')
451 source.addMaven('javax.inject:com.springsource.javax.inject:1.0.0')
452 source.addMaven('org.apache.felix:org.apache.felix.scr:2.1.16')
453 source.addMaven('org.osgi:org.osgi.framework:1.9.0')
454 source.addMaven('org.osgi:org.osgi.service.component:1.4.0')
455 source.addMaven('org.osgi:org.osgi.service.event:1.4.0')
456 source.addMaven('org.osgi:org.osgi.util.promise:1.1.1')
457 source.addMaven('org.osgi:org.osgi.util.function:1.1.0')
458 source.addMaven('org.eclipse.jdt:org.eclipse.jdt.apt.core:3.6.500')
459 source.addMaven('org.eclipse.jdt:org.eclipse.jdt.core:3.19.0')
460 source.addMaven('org.eclipse.jdt:org.eclipse.jdt.annotation:2.2.300')
462 // org.eclipse.update.configurator deliberately kept at 3.3.400 see https://github.com/diffplug/goomph/issues/69
463 source.addMaven('org.eclipse.platform:org.eclipse.update.configurator:3.3.400')
465 launchTask 'ideJalviewjsImport', {
466 it.args = ["-consoleLog", "--launcher.suppressErrors", "-application", "com.seeq.eclipse.importprojects.headlessimport", "-data", eclipseWorkspace.getPath(), "-import", jalviewDirAbsolutePath ]
469 launchTask 'ideJalviewjsBuild', {
470 it.args = ["-consoleLog", "--launcher.suppressErrors", "-application", "org.eclipse.jdt.apt.core.aptBuild", "-data", eclipseWorkspace.getPath(), "-"+jalviewjs_eclipseBuildArg, eclipse_project_name ]
477 task ideCopyDropins (type: Copy) {
480 def inputFiles = fileTree(jalviewjs_utils_dir+"/"+jalviewjs_eclipse_dropins_dir)
481 def outputDir = oomphIde.ideDir + "/" + com.diffplug.gradle.FileMisc.macContentsEclipse() + "/dropins"
487 outputFiles += outputDir+"/"+filename
488 println("COPYING ${filename} to ${outputFiles}")
491 outputs.files outputFiles
492 inputs.files inputFiles
497 ideSetupWorkspace.dependsOn jalviewjsSetEclipseWorkspace
498 ideSetupWorkspace.outputs.upToDateWhen {file(eclipseWorkspace).exists()}
502 dependsOn ideSetupWorkspace
519 def jalviewjsBuildDir
521 task jalviewjsSitePath {
522 if (jalviewjs_site_dir.startsWith("/")) {
523 jalviewjsSiteDir = jalviewjs_site_dir
525 def relativeBuildDir = file(jalviewDirAbsolutePath).toPath().relativize(buildDir.toPath())
526 jalviewjsBuildDir = "${relativeBuildDir}/jalviewjs"
527 jalviewjsSiteDir = jalviewjsBuildDir + "/" + jalviewjs_site_dir
532 task jalviewjsUnzipFiles {
533 dependsOn jalviewjsSitePath
535 def zipFiles = fileTree(dir: jalviewjs_utils_dir+"/"+jalviewjs_libjs_dir).include("*.zip")
536 zipFiles += jalviewjs_utils_dir+"/"+jalviewjs_swingjs_zip
539 zipFiles.each { file_zip ->
541 from zipTree(file_zip)
542 into jalviewjsSiteDir
547 inputs.files zipFiles
548 outputs.dir jalviewjsSiteDir
551 def eclipseDropinsDir
553 task jalviewjsEclipsePaths {
556 eclipseRoot = oomphIde.ideDir
557 eclipseDropinsDir = eclipseRoot+"/"+com.diffplug.gradle.FileMisc.macContentsEclipse()+"/dropins"
558 eclipseBinary = eclipseRoot+"/"+com.diffplug.common.swt.os.OS.getNative().winMacLinux("", "Contents/MacOS", "")+"/eclipse"
560 eclipseRoot = jalviewjs_eclipse_root
561 if (eclipseRoot.startsWith("~")) {
562 eclipseRoot = System.getProperty("user.home") + eclipseRoot.substring(1)
564 if (OperatingSystem.current().isMacOsX()) {
565 eclipseRoot += "/Eclipse.app"
566 eclipseDropinsDir = eclipseRoot+"/Contents/Eclipse/dropins"
567 eclipseBinary = eclipseRoot+"/Contents/MacOS/eclipse"
568 } else if (OperatingSystem.current().isWindows()) { // check these paths!!
569 eclipseDropinsDir = eclipseRoot+"/dropins"
570 eclipseBinary = eclipseRoot+"/eclipse"
571 } else { // linux or unix
572 eclipseDropinsDir = eclipseRoot+"/dropins"
573 eclipseBinary = eclipseRoot+"/eclipse"
576 //println("ECLIPSE_ROOT=${eclipseRoot}")
577 //println("ECLIPSE_BINARY=${eclipseBinary}")
580 //task jalviewjsEclipseCopyDropins (type: Copy) {
581 task jalviewjsEclipseCopyDropins {
582 dependsOn jalviewjsEclipsePaths
583 def inputFiles = fileTree(dir: jalviewjs_utils_dir+"/"+jalviewjs_eclipse_dropins_dir, include: "*.jar")
584 def outputDir = eclipseDropinsDir
586 inputs.files inputFiles
587 inputFiles.each { file ->
588 outputs.file(outputDir+"/"+file.name)
593 inputFiles.each { file ->
602 task jalviewjsEclipseSetup {
603 dependsOn jalviewjsEclipseCopyDropins
604 dependsOn jalviewjsSetEclipseWorkspace
608 task jalviewjsCreateJ2sSettings(type: WriteProperties) {
609 dependsOn jalviewjsSitePath
610 outputFile (jalviewDir+"/"+jalviewjs_j2s_settings)
611 def props = project.properties.sort { it.key }
612 def siteDirProperty = "j2s.site.directory"
613 def setSiteDir = false
614 props.each { prop, val ->
615 if (prop.startsWith("j2s.") && val != null) {
616 if (prop == siteDirProperty) {
617 if (!(val.startsWith("/") || val.startsWith("file://") )) {
618 val = jalviewjsSiteDir+"/"+val
625 property(siteDirProperty,"${jalviewjsSiteDir}")
628 outputs.file(outputFile)
631 task jalviewjsCopyResources (type: Copy) {
632 dependsOn jalviewjsSitePath
633 def inputFiles = fileTree(dir: jalviewjs_resource_dir)
634 def outputDir = jalviewjsSiteDir+"/"+jalviewjs_j2s_subdir
640 outputFiles += outputDir+"/"+filename
643 outputs.files outputFiles
644 inputs.files inputFiles
647 task jalviewjsCopySiteResources (type: Copy) {
648 dependsOn jalviewjsSitePath
649 def inputFiles = fileTree(dir: jalviewjs_utils_dir+"/"+jalviewjs_site_resource_dir)
650 def outputDir = jalviewjsSiteDir
656 outputFiles += outputDir+"/"+filename
659 outputs.files outputFiles
660 inputs.files inputFiles
663 task cleanJalviewjs {
664 dependsOn jalviewjsSitePath
666 delete jalviewDir+"/"+jalviewjsSiteDir
667 delete jalviewDir+"/"+eclipse_bin_dir
668 delete file(eclipseWorkspace.getAbsolutePath()+"/.metadata")
669 delete jalviewDir+"/"+jalviewjs_j2s_settings
673 task jalviewjsProjectImport(type: Exec) {
674 // work out how to do this!
675 dependsOn eclipseProject
676 dependsOn eclipseClasspath
678 dependsOn jalviewjsEclipsePaths
679 dependsOn jalviewjsEclipseSetup
680 executable(eclipseBinary)
681 args(["-nosplash", "--launcher.suppressErrors", "-application", "com.seeq.eclipse.importprojects.headlessimport", "-data", eclipseWorkspace.getPath(), "-import", jalviewDirAbsolutePath])
683 def projdir = eclipseWorkspace.getPath()+"/.metadata/.plugins/org.eclipse.core.resources/.projects/jalview/org.eclipse.jdt.core"
684 inputs.file(jalviewDir+"/.project")
686 outputs.upToDateWhen { file(projdir).exists() }
696 task jalviewjsTranspile(type: Exec) {
697 dependsOn jalviewjsCreateJ2sSettings
698 dependsOn jalviewjsProjectImport
699 dependsOn jalviewjsEclipsePaths
700 executable(eclipseBinary)
701 args(["-nosplash", "--launcher.suppressErrors", "-application", "org.eclipse.jdt.apt.core.aptBuild", "-data", eclipseWorkspace, "-"+jalviewjs_eclipseBuildArg, eclipse_project_name ])
706 stdout = new ByteArrayOutputStream()
707 stderr = new ByteArrayOutputStream()
708 standardOutput = new org.apache.tools.ant.util.TeeOutputStream(new FileOutputStream("${jalviewjsBuildDir}/${jalviewjs_j2s_stdout}"), stdout);
709 errorOutput = new org.apache.tools.ant.util.TeeOutputStream(new FileOutputStream("${jalviewjsBuildDir}/${jalviewjs_j2s_stderr}"), stderr);
712 if (stdout.toString().contains("Error processing ")) {
713 // j2s did not complete transpile
714 throw new GradleException("Error during transpilation:\n${stderr}\nSee eclipse transpile log files '${jalviewjsBuildDir}/${jalviewjs_j2s_stdout}' and '${jalviewjsBuildDir}/${jalviewjs_j2s_stderr}'\n")
718 inputs.dir(sourceDir)
719 outputs.dir(eclipse_bin_dir+"/main")
722 dir: jalviewjsSiteDir+"/"+jalviewjs_j2s_subdir,
723 includes: [ "**/*.js" ],
725 //jalviewjsSiteDir+"/"+jalviewjs_j2s_subdir+"/intervalstore/**",
726 //jalviewjsSiteDir+"/"+jalviewjs_j2s_subdir+"/org/json/**",
732 outputs.file(jalviewjsSiteDir+jalviewjs_server_resource)
741 jalviewjsUnzipFiles.mustRunAfter jalviewjsTranspile
742 jalviewjsTranspile.mustRunAfter jalviewjsCopyResources
743 jalviewjsTranspile.mustRunAfter jalviewjsCopySiteResources
745 task jalviewjsBuildSite {
746 dependsOn jalviewjsSitePath
747 dependsOn jalviewjsUnzipFiles
748 dependsOn jalviewjsCopyResources
749 dependsOn jalviewjsCopySiteResources
750 dependsOn jalviewjsTranspile
753 task jalviewjsSiteTar(type: Tar) {
754 dependsOn jalviewjsBuildSite
755 def outputFilename = "jalviewjs-site-${JALVIEW_VERSION}.tar.gz"
757 archiveFileName = outputFilename
758 } catch (Exception e) {
759 archiveName = outputFilename
762 compression Compression.GZIP
764 from jalviewjsSiteDir
765 into jalviewjs_site_dir // this is inside the tar file
767 inputs.dir(jalviewjsSiteDir)
770 def jalviewjsServer = null
771 task jalviewjsServerStart {
772 dependsOn jalviewjsSitePath
775 if (jalviewjsServer != null) {
776 println("SERVER ALREADY RUNNING. Go to "+jalviewjsServer.getResourceUrl(jalviewjs_server_resource)+" . Run gradle jalviewjsServerStop to stop.")
779 SimpleHttpFileServerFactory factory = new SimpleHttpFileServerFactory()
780 def port = Integer.valueOf(jalviewjs_server_port)
783 while(port < start+1000 && !running) {
785 def doc_root = new File(jalviewDirAbsolutePath +"/"+ jalviewjsSiteDir)
786 jalviewjsServer = factory.start(doc_root, port)
788 println("SERVER STARTED with document root ${doc_root}.\nGo to "+jalviewjsServer.getResourceUrl(jalviewjs_server_resource)+" . Run gradle --stop to stop (kills all gradle daemons).")
789 //println("Ctrl-c to stop.");java.lang.Thread.sleep(Integer.valueOf(jalviewjs_server_wait)*1000);
790 } catch (Exception e) {
801 /* server persists in gradle daemon but reference is not accessible across builds
802 task jalviewjsServerStop {
805 if (jalviewjsServer != null) {
807 println("SERVER ON PORT "+jalviewjsServer.getPort()+" STOPPING. Run gradle jalviewjsServerStart to start again.")
808 jalviewjsServer.stop()
811 println("SERVER NOT RUNNING. Run gradle jalviewjsServerStart to start.")
819 dependsOn jalviewjsSitePath
820 dependsOn jalviewjsUnzipFiles
821 dependsOn jalviewjsCopyResources
822 dependsOn jalviewjsCopySiteResources
831 dependsOn jalviewjsBuildSite
835 project.afterEvaluate {
836 tasks.findByName('ideJalviewjsImport').dependsOn eclipseProject
837 tasks.findByName('ideJalviewjsImport').dependsOn eclipseClasspath
838 tasks.findByName('ideJalviewjsImport').dependsOn eclipseJdt
839 tasks.findByName('ideJalviewjsImport').dependsOn jalviewjsSetEclipseWorkspace
841 tasks.findByName('ideJalviewjsBuild').dependsOn tasks.findByName('ideJalviewjsImport')
843 tasks.findByName('ide').dependsOn eclipseProject
844 tasks.findByName('ide').dependsOn eclipseClasspath
845 tasks.findByName('ide').dependsOn eclipseJdt