<arg value="-nointernet" />
</java>
</target>
-
- <target name="eclipse-install" depends="init,prepare">
-
- <property name="eclipseTempFile" value="eclipse-jee-oxygen-R-linux-gtk-x86_64.tar.gz"/>
- <property name="eclipseInstallURL" value="http://mirror.csclub.uwaterloo.ca/eclipse/technology/epp/downloads/release/oxygen/R/eclipse-jee-oxygen-R-linux-gtk-x86_64.tar.gz"/>
- <property name="java2scriptURL" value="https://github.com/BobHanson/java2script/blob/master/sources/net.sf.j2s.core/dist/dropins/net.sf.j2s.core.jar?raw=true"/>
-
- <get url="${eclipseInstallURL}" dest="${eclipseTempFile}"/>
- <untar compression="gzip" src="${eclipseTempFile}" dest="eclipse-inst"/>
- <get url="${java2scriptURL}" dest="eclipse-inst/dropins/net.sf.j2s.core.jar"/>
-
- </target>
+
+<target name="eclipse-install" depends="init,prepare">
+
+ <property name="eclipseTempFile" value="eclipse-jee-oxygen-R-linux-gtk-x86_64.tar.gz"/>
+ <property name="eclipseInstallURL" value="http://mirror.csclub.uwaterloo.ca/eclipse/technology/epp/downloads/release/oxygen/R/eclipse-jee-oxygen-R-linux-gtk-x86_64.tar.gz"/>
+ <property name="java2scriptURL" value="https://github.com/BobHanson/java2script/blob/master/sources/net.sf.j2s.core/dist/dropins/net.sf.j2s.core.jar?raw=true"/>
+
+ <get url="${eclipseInstallURL}" dest="${eclipseTempFile}"/>
+ <untar compression="gzip" src="${eclipseTempFile}" dest="${eclipse-inst}"/>
+
+ <!-- not needed since we ship transpiler with source
+ <get url="${java2scriptURL}" dest="eclipse-inst/dropins/net.sf.j2s.core.jar" /> -->
+
+</target>
<target name="build-site" depends="init,prepare">
+ <property name="swingjsdir" value="swingjs"/>
+ <property name="eclipse-inst" value="../../eclipse-js/"/>
+ <property name="eclipse-exec" value="${eclipse-inst}/bin/eclipse"/>
+ <property name="site" value="site"/>
+ <!-- where the eclipse js workspace has been initialised -->
+ <property name="eclipse-workspace" value="/cluster/gjb_lab/jprocter/eclipse-workspace"/>
+
<!-- execute eclipse build, trap log and dump to stdout here -->
-
+ <copy file="${swingjsdir}/net.sf.j2s.core.jar" todir="${eclipse-inst}/dropins"/>
+
+ <!-- the build may fail but valid javascript may still be produced, so we ignore return codes -->
+ <exec executable="${eclipse-exec}" failonerror="no">
+ <arg value="-nosplash"/>
+ <arg value="--launcher.suppressErrors"/>
+ <arg value="-application"/>
+ <arg value="org.eclipse.jdt.apt.core.aptBuild"/>
+ <arg value="-data"/>
+ <arg value="${eclipse-workpace}"/>
+ </exec>
+
+ <!-- TODO: run jslint and something else here to check we have a complete set of .js files for java -->
+
<!-- <mkdir dir="${packageDir}/${site}" /> -->
- <property name="swingjs.zipurl" value="https://github.com/BobHanson/java2script/blob/master/sources/net.sf.j2s.java.core/dist/SwingJS-site.zip?raw=true" />
- <property name="swingjs.zip" value="SwingJS-site.zip" />
- <get src="${swingjs.zipurl}" dest="" usetimestamp="true" />
- <unzip src="${swingjs.zip}" dest="${packageDir}/${site}/" />
-</target>
+ <!-- <property name="swingjs.zipurl" value="https://github.com/BobHanson/java2script/blob/master/sources/net.sf.j2s.java.core/dist/SwingJS-site.zip?raw=true" /> -->
+ <property name="swingjs.zip" value="${swingjsdir}/SwingJS-site.zip" />
+ <unzip src="${swingjs.zip}" dest="${site}/" overwrite="true"/>
+ <copy todir="${site}/swingjs/j2s/">
+ <fileset dir="${resourceDir}">
+ <include name="**"/>
+ </fileset>
+ </copy>
+ <copy todir="${site}/examples">
+ <fileset dir="examples">
+ <include name="*.*"/>
+ </fileset>
+ </copy>
<!-- closure compile -->
<!-- copy test files into place in site -->
-</project>
+</target>
+</project>
\ No newline at end of file