--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="cakelight" default="all">
+
+
+ <property file="config.properties"/>
+ <property name="jdk.home.1.8" value="/usr/lib/jvm/java-8-openjdk-amd64" />
+ <!-- Uncomment the following property if no tests compilation is needed -->
+ <!--
+ <property name="skip.tests" value="true"/>
+ -->
+
+ <!-- Compiler options -->
+
+ <property name="compiler.debug" value="on"/>
+ <property name="compiler.generate.no.warnings" value="off"/>
+ <property name="compiler.args" value=""/>
+ <property name="compiler.max.memory" value="700m"/>
+ <patternset id="ignored.files">
+ <exclude name="**/*.hprof/**"/>
+ <exclude name="**/*.pyc/**"/>
+ <exclude name="**/*.pyo/**"/>
+ <exclude name="**/*.rbc/**"/>
+ <exclude name="**/*.yarb/**"/>
+ <exclude name="**/*~/**"/>
+ <exclude name="**/.DS_Store/**"/>
+ <exclude name="**/.git/**"/>
+ <exclude name="**/.hg/**"/>
+ <exclude name="**/.svn/**"/>
+ <exclude name="**/CVS/**"/>
+ <exclude name="**/__pycache__/**"/>
+ <exclude name="**/_svn/**"/>
+ <exclude name="**/vssver.scc/**"/>
+ <exclude name="**/vssver2.scc/**"/>
+ </patternset>
+ <patternset id="library.patterns">
+ <include name="*.war"/>
+ <include name="*.swc"/>
+ <include name="*.zip"/>
+ <include name="*.egg"/>
+ <include name="*.ane"/>
+ <include name="*.jar"/>
+ <include name="*.ear"/>
+ </patternset>
+ <patternset id="compiler.resources">
+ <exclude name="**/?*.java"/>
+ <exclude name="**/?*.form"/>
+ <exclude name="**/?*.class"/>
+ <exclude name="**/?*.groovy"/>
+ <exclude name="**/?*.scala"/>
+ <exclude name="**/?*.flex"/>
+ <exclude name="**/?*.kt"/>
+ <exclude name="**/?*.clj"/>
+ <exclude name="**/?*.aj"/>
+ </patternset>
+
+ <!-- JDK definitions -->
+
+ <property name="jdk.bin.1.8" value="${jdk.home.1.8}/bin"/>
+ <path id="jdk.classpath.1.8">
+ <fileset dir="${jdk.home.1.8}">
+ <include name="jre/lib/charsets.jar"/>
+ <include name="jre/lib/ext/cldrdata.jar"/>
+ <include name="jre/lib/ext/dnsns.jar"/>
+ <include name="jre/lib/ext/icedtea-sound.jar"/>
+ <include name="jre/lib/ext/jaccess.jar"/>
+ <include name="jre/lib/ext/localedata.jar"/>
+ <include name="jre/lib/ext/nashorn.jar"/>
+ <include name="jre/lib/ext/sunec.jar"/>
+ <include name="jre/lib/ext/sunjce_provider.jar"/>
+ <include name="jre/lib/ext/sunpkcs11.jar"/>
+ <include name="jre/lib/ext/zipfs.jar"/>
+ <include name="jre/lib/jce.jar"/>
+ <include name="jre/lib/jsse.jar"/>
+ <include name="jre/lib/management-agent.jar"/>
+ <include name="jre/lib/resources.jar"/>
+ <include name="jre/lib/rt.jar"/>
+ <include name="jre/lib/ext/jfxrt.jar"/>
+ </fileset>
+ </path>
+
+ <property name="project.jdk.home" value="${jdk.home.1.8}"/>
+ <property name="project.jdk.bin" value="${jdk.bin.1.8}"/>
+ <property name="project.jdk.classpath" value="jdk.classpath.1.8"/>
+
+
+ <!-- Project Libraries -->
+
+ <path id="library.opencv.classpath">
+ <pathelement location="/usr/share/java/opencv.jar"/>
+ </path>
+
+ <path id="library.pi4j.classpath">
+ <fileset dir="${basedir}/lib/pi4j">
+ <patternset refid="library.patterns"/>
+ </fileset>
+ </path>
+
+ <!-- Modules -->
+
+
+ <!-- Module CakeLight -->
+
+ <dirname property="module.cakelight.basedir" file="${ant.file}"/>
+
+
+ <property name="module.jdk.home.cakelight" value="${project.jdk.home}"/>
+ <property name="module.jdk.bin.cakelight" value="${project.jdk.bin}"/>
+ <property name="module.jdk.classpath.cakelight" value="${project.jdk.classpath}"/>
+
+ <property name="compiler.args.cakelight" value="-encoding UTF-8 -source 8 -target 8 ${compiler.args}"/>
+
+ <property name="cakelight.output.dir" value="${module.cakelight.basedir}/out/production/CakeLight"/>
+ <property name="cakelight.testoutput.dir" value="${module.cakelight.basedir}/out/test/CakeLight"/>
+
+ <path id="cakelight.module.bootclasspath">
+ <!-- Paths to be included in compilation bootclasspath -->
+ </path>
+
+ <path id="cakelight.module.production.classpath">
+ <path refid="${module.jdk.classpath.cakelight}"/>
+ <path refid="library.opencv.classpath"/>
+ <path refid="library.pi4j.classpath"/>
+ </path>
+
+ <path id="cakelight.runtime.production.module.classpath">
+ <pathelement location="${cakelight.output.dir}"/>
+ <path refid="library.opencv.classpath"/>
+ <path refid="library.pi4j.classpath"/>
+ </path>
+
+ <path id="cakelight.module.classpath">
+ <path refid="${module.jdk.classpath.cakelight}"/>
+ <pathelement location="${cakelight.output.dir}"/>
+ <path refid="library.opencv.classpath"/>
+ <path refid="library.pi4j.classpath"/>
+ </path>
+
+ <path id="cakelight.runtime.module.classpath">
+ <pathelement location="${cakelight.testoutput.dir}"/>
+ <pathelement location="${cakelight.output.dir}"/>
+ <path refid="library.opencv.classpath"/>
+ <path refid="library.pi4j.classpath"/>
+ </path>
+
+
+ <patternset id="excluded.from.module.cakelight">
+ <patternset refid="ignored.files"/>
+ </patternset>
+
+ <patternset id="excluded.from.compilation.cakelight">
+ <patternset refid="excluded.from.module.cakelight"/>
+ </patternset>
+
+ <path id="cakelight.module.sourcepath">
+ <dirset dir="${module.cakelight.basedir}">
+ <include name="src"/>
+ </dirset>
+ </path>
+
+
+ <target name="compile.module.cakelight" depends="compile.module.cakelight.production,compile.module.cakelight.tests" description="Compile module CakeLight"/>
+
+ <target name="compile.module.cakelight.production" description="Compile module CakeLight; production classes">
+ <mkdir dir="${cakelight.output.dir}"/>
+ <javac destdir="${cakelight.output.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" memorymaximumsize="${compiler.max.memory}" fork="true" executable="${module.jdk.bin.cakelight}/javac">
+ <compilerarg line="${compiler.args.cakelight}"/>
+ <bootclasspath refid="cakelight.module.bootclasspath"/>
+ <classpath refid="cakelight.module.production.classpath"/>
+ <src refid="cakelight.module.sourcepath"/>
+ <patternset refid="excluded.from.compilation.cakelight"/>
+ </javac>
+
+ <copy todir="${cakelight.output.dir}">
+ <fileset dir="${module.cakelight.basedir}/src">
+ <patternset refid="compiler.resources"/>
+ <type type="file"/>
+ </fileset>
+ </copy>
+
+ <jar destfile="${cakelight.output.dir}/cakelight.jar">
+ <fileset dir="${cakelight.output.dir}" />
+ <!-- TODO replace hard links -->
+ <zipfileset includes="**/*.class" src="${module.cakelight.basedir}/lib/pi4j/pi4j-core.jar" />
+ <zipfileset includes="**/*.class" src="/usr/share/java/opencv.jar" />
+ <manifest>
+ <attribute name="Main-Class" value="kaka.cakelight.LedController" />
+ </manifest>
+ </jar>
+ </target>
+
+ <target name="compile.module.cakelight.tests" depends="compile.module.cakelight.production" description="compile module CakeLight; test classes" unless="skip.tests"/>
+
+ <target name="clean.module.cakelight" description="cleanup module">
+ <delete dir="${cakelight.output.dir}"/>
+ <delete dir="${cakelight.testoutput.dir}"/>
+ </target>
+
+ <target name="init" description="Build initialization">
+ <!-- Perform any build initialization in this target -->
+ </target>
+
+ <target name="clean" depends="clean.module.cakelight" description="cleanup all"/>
+
+ <target name="build.modules" depends="init, clean, compile.module.cakelight" description="build all modules"/>
+
+ <target name="all" depends="build.modules" description="build all"/>
+</project>
\ No newline at end of file