mirror of
https://github.com/processing/processing4.git
synced 2026-02-03 05:39:18 +01:00
120 lines
3.9 KiB
XML
120 lines
3.9 KiB
XML
<?xml version="1.0"?>
|
|
<project name="Processing Core" default="build">
|
|
|
|
<property environment="env"/>
|
|
|
|
<target name="clean" description="Clean out the build directories">
|
|
<delete dir="bin" />
|
|
<delete dir="bin-test" />
|
|
<delete file="library/core.jar" />
|
|
</target>
|
|
|
|
<target name="methods-check">
|
|
<available file="methods/methods.jar" property="methods.present" />
|
|
</target>
|
|
|
|
<target name="methods-build" depends="methods-check" unless="methods.present">
|
|
<subant buildpath="methods" target="dist" />
|
|
</target>
|
|
|
|
<path id="classpath.base">
|
|
<pathelement location="library/jogl-all.jar" />
|
|
<pathelement location="library/gluegen-rt.jar" />
|
|
<pathelement location="library/javafx-swt.jar" />
|
|
<pathelement location="library/javafx.base.jar" />
|
|
<pathelement location="library/javafx.controls.jar" />
|
|
<pathelement location="library/javafx.fxml.jar" />
|
|
<pathelement location="library/javafx.graphics.jar" />
|
|
<pathelement location="library/javafx.media.jar" />
|
|
<pathelement location="library/javafx.properties" />
|
|
<pathelement location="library/javafx.swing.jar" />
|
|
<pathelement location="library/javafx.web.jar" />
|
|
</path>
|
|
|
|
<path id="classpath.test">
|
|
<pathelement location="library-test/junit-4.8.1.jar" />
|
|
<pathelement location="library-test/mockito-all-1.10.19.jar" />
|
|
<pathelement location="bin-test" />
|
|
<path refid="classpath.base" />
|
|
</path>
|
|
|
|
<macrodef name="compilecommon">
|
|
<attribute name="destdir"/>
|
|
<attribute name="srcdir"/>
|
|
<attribute name="classpath"/>
|
|
<sequential>
|
|
<taskdef name="methods"
|
|
classname="PAppletMethods"
|
|
classpath="methods/methods.jar" />
|
|
<methods dir="${basedir}/src/processing/core" recorder="true" />
|
|
|
|
<!-- Where can I expect to find Java Mode JARs? -->
|
|
<property name="java.mode" value="../java/mode/" />
|
|
|
|
<!-- JavaFX got removed from the Oracle's JDK for arm and Java 11 -->
|
|
<condition property="fx.unavailable" value="true">
|
|
<or>
|
|
<equals arg1="${os.arch}" arg2="arm" />
|
|
<equals arg1="${os.arch}" arg2="aarch64" />
|
|
</or>
|
|
</condition>
|
|
|
|
<mkdir dir="@{destdir}" />
|
|
<javac source="11"
|
|
target="11"
|
|
encoding="UTF-8"
|
|
includeAntRuntime="false"
|
|
debug="true"
|
|
destdir="@{destdir}"
|
|
nowarn="true">
|
|
<classpath refid="@{classpath}"/>
|
|
<src path="@{srcdir}" />
|
|
<include name="processing/**" />
|
|
<exclude name="processing/javafx/**" if="fx.unavailable" />
|
|
</javac>
|
|
|
|
<!-- Copy the jnilib to the bin folder so it's included. -->
|
|
<copy todir="bin/japplemenubar"
|
|
file="src/japplemenubar/libjAppleMenuBar.jnilib" />
|
|
|
|
<!-- Copy shaders to bin. (Eclipse does this automatically.) -->
|
|
<copy todir="bin">
|
|
<fileset dir="src">
|
|
<include name="processing/opengl/shaders/*.glsl" />
|
|
<include name="processing/opengl/cursors/*.png" />
|
|
<include name="icon/*.png" />
|
|
</fileset>
|
|
</copy>
|
|
</sequential>
|
|
</macrodef>
|
|
|
|
<target name="test-compile" description="Compile" depends="methods-build">
|
|
<compilecommon srcdir="src; test" destdir="bin-test" classpath="classpath.test" />
|
|
</target>
|
|
|
|
<target name="clean-pre-test" description="Required step prior to test">
|
|
<delete dir="resource-test/scratch" />
|
|
</target>
|
|
|
|
<target name="test" depends="test-compile, clean-pre-test">
|
|
<junit haltonfailure="true">
|
|
<classpath refid="classpath.test" />
|
|
<formatter type="brief" usefile="false" />
|
|
<batchtest>
|
|
<fileset dir="test">
|
|
<include name="**/*Test.java" />
|
|
</fileset>
|
|
</batchtest>
|
|
</junit>
|
|
</target>
|
|
|
|
<target name="compile" description="Compile" depends="test">
|
|
<compilecommon srcdir="src" destdir="bin" classpath="classpath.base" />
|
|
</target>
|
|
|
|
<target name="build" depends="compile" description="Build core library">
|
|
<jar basedir="bin" destfile="library/core.jar" />
|
|
</target>
|
|
|
|
</project>
|