mirror of
https://github.com/processing/processing4.git
synced 2026-02-14 02:45:36 +01:00
Minor bit of cleanup in the ant scripts around the build src and target on javac, enabling use of Java 11 language features within processing itself. Note that the build is sustained on either 1.8 or 11 in terms of lanugage features but the code is no longer compatible with the Java 8 runtime due to backwards-incompatable changes made starting in Java 9.
73 lines
2.1 KiB
XML
73 lines
2.1 KiB
XML
<project name="downloader" default="dist">
|
|
|
|
<path id="classpath.base">
|
|
<!-- kinda gross, but if not using the JDT, this just ignored anyway -->
|
|
<pathelement location="${jdt.jar};" />
|
|
<pathelement location="${java.mode}/jdtCompilerAdapter.jar" />
|
|
</path>
|
|
|
|
<path id="classpath.test">
|
|
<pathelement location="../../core/library-test/junit-4.8.1.jar" />
|
|
<pathelement location = "bin-test" />
|
|
<path refid="classpath.base" />
|
|
</path>
|
|
|
|
<macrodef name="compilecommon">
|
|
<attribute name="destdir"/>
|
|
<attribute name="srcdir"/>
|
|
<attribute name="classpath"/>
|
|
<sequential>
|
|
<mkdir dir="@{destdir}" />
|
|
|
|
<!-- Where can I expect to find Java Mode JARs? -->
|
|
<property name="java.mode" value="../../java/mode/" />
|
|
|
|
<javac source="11"
|
|
target="11"
|
|
srcdir="@{srcdir}"
|
|
destdir="@{destdir}"
|
|
debug="true"
|
|
includeantruntime="true"
|
|
nowarn="true">
|
|
<classpath refid="@{classpath}"/>
|
|
</javac>
|
|
</sequential>
|
|
</macrodef>
|
|
|
|
<target name="test-compile">
|
|
<compilecommon srcdir="src; test" destdir="bin-test" classpath="classpath.test" />
|
|
</target>
|
|
|
|
<target name="test" depends="test-compile">
|
|
<junit haltonfailure="true">
|
|
<classpath refid="classpath.test" />
|
|
<formatter type="brief" usefile="false" />
|
|
<test name="AdoptOpenJdkDownloadUrlGeneratorTest" />
|
|
<test name="OracleDownloadUrlGeneratorTest" />
|
|
</junit>
|
|
</target>
|
|
|
|
<target name="compile" depends="test">
|
|
<compilecommon srcdir="src" destdir="bin" classpath="classpath.base" />
|
|
</target>
|
|
|
|
<target name="dist" depends="compile">
|
|
<jar basedir="bin" destfile="downloader.jar" />
|
|
</target>
|
|
|
|
<target name="demo" depends="dist">
|
|
<taskdef name="downloader"
|
|
classname="Downloader"
|
|
classpath="downloader.jar" />
|
|
<downloader version="8" update="31" build="13"
|
|
jdk="true" flavor="macosx-x64.dmg" />
|
|
</target>
|
|
|
|
<target name="clean">
|
|
<delete dir="bin" />
|
|
<delete dir="bin-test" />
|
|
<delete file="downloader.jar" />
|
|
</target>
|
|
|
|
</project>
|