X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=build.gradle;h=9987e3baa5159720b9161cdc256e726466d18b6d;hb=9a3fbb958e7b83e448f34eaadd32a9667bd444ca;hp=2c1a56d7ac5fc157ead5bcc36eab17001beeba3e;hpb=7894f6f84cbf22218c293149614321796e28acb8;p=jalview.git diff --git a/build.gradle b/build.gradle index 2c1a56d..9987e3b 100644 --- a/build.gradle +++ b/build.gradle @@ -628,7 +628,15 @@ eclipse { //println("Not adding duplicate entry "+itPath) } else { //println("Adding entry "+itPath) - cp.entries += new Library(fileReference(itPath)) + def lib = new Library(fileReference(itPath)) + // check for source jar + def sourcePath = file("${j11sourcesDir}/"+it.name.replaceAll(".jar\$","-sources.jar")) + if (sourcePath.exists()) { + def refFactory = eclipse.classpath.getFileReferenceFactory(); + def sourceRef = refFactory.fromFile(sourcePath) + lib.setSourcePath(sourceRef) + } + cp.entries += lib alreadyAddedLibPath.put(itPath, true) } } @@ -656,6 +664,18 @@ eclipse { } // whenMerged + /* + withXml { + xml -> + def node = xml.asNode() + node.classpathentry.forEach { + if (it.@kind == "lib") { + println("LIB "+it.toString()) + } + } + } + */ + } // file containers 'org.eclipse.buildship.core.gradleclasspathcontainer' @@ -1369,13 +1389,12 @@ task linkCheck(type: JavaExec) { args = [ "${helpBuildDir}/${help_dir}", "-nointernet" ] def outFOS = new FileOutputStream(helpLinksCheckerOutFile, false) // false == don't append - def errFOS = outFOS standardOutput = new org.apache.tools.ant.util.TeeOutputStream( outFOS, - standardOutput) + System.out) errorOutput = new org.apache.tools.ant.util.TeeOutputStream( outFOS, - errorOutput) + System.err) inputs.dir(helpBuildDir) outputs.file(helpLinksCheckerOutFile) @@ -2548,12 +2567,12 @@ DEBUG: ${eclipseDebug} new org.apache.tools.ant.util.TeeOutputStream( logOutFOS, stdout), - standardOutput) + System.out) errorOutput = new org.apache.tools.ant.util.TeeOutputStream( new org.apache.tools.ant.util.TeeOutputStream( logErrFOS, stderr), - errorOutput) + System.err) } else { standardOutput = new org.apache.tools.ant.util.TeeOutputStream( logOutFOS, @@ -2948,7 +2967,13 @@ task jalviewjsServer { def htmlFile = "${jalviewDirAbsolutePath}/${filename}" doLast { - SimpleHttpFileServerFactory factory = new SimpleHttpFileServerFactory() + def factory + try { + def f = Class.forName("org.gradle.plugins.javascript.envjs.http.simple.SimpleHttpFileServerFactory") + factory = f.newInstance() + } catch (ClassNotFoundException e) { + throw new GradleException("Unable to create SimpleHttpFileServerFactory") + } def port = Integer.valueOf(jalviewjs_server_port) def start = port def running = false