summaryrefslogtreecommitdiff
path: root/smartdashboard/build.xml
diff options
context:
space:
mode:
Diffstat (limited to 'smartdashboard/build.xml')
-rw-r--r--smartdashboard/build.xml91
1 files changed, 91 insertions, 0 deletions
diff --git a/smartdashboard/build.xml b/smartdashboard/build.xml
new file mode 100644
index 0000000..6585753
--- /dev/null
+++ b/smartdashboard/build.xml
@@ -0,0 +1,91 @@
+<project name="SmartDashboard" basedir="." default="main">
+ <property name="src.dir" value="src" />
+ <property name="test.dir" value="tests" />
+ <property name="build.dir" value="build" />
+ <property name="dist.dir" value="dist" />
+ <property name="classes.dir" value="${build.dir}/classes" />
+ <property name="javadoc.dir" value="${build.dir}/javadoc" />
+ <property name="junitreport.dir" value="${build.dir}/junitreport" />
+ <property name="lib.dir" value="lib" />
+
+ <property name="main-class" value="edu.wpi.first.smartdashboard.main" />
+
+ <path id="application" location="${jar.dir}/${ant.project.name}.jar" />
+ <path id="classpath">
+ <fileset dir="${lib.dir}" includes="**/*.jar" />
+ </path>
+
+ <target name="clean">
+ <delete dir="${build.dir}" />
+ <delete dir="${dist.dir}" />
+ </target>
+
+
+ <target name="compile">
+ <mkdir dir="${classes.dir}" />
+ <javac srcdir="${src.dir}"
+ destdir="${classes.dir}"
+ classpathref="classpath"
+ includeantruntime="false"
+ debug="on"
+ debuglevel="lines,vars,source"/>
+ </target>
+
+ <target name="javadoc">
+ <mkdir dir="${javadoc.dir}" />
+ <javadoc sourcepath="${src.dir}" destdir="${javadoc.dir}" author="true" version="true" use="true" windowtitle="Smart Dashboard">
+ <doctitle>
+ <![CDATA[
+ <h1>Smart Dashboard</h1>
+ ]]>
+ </doctitle>
+ </javadoc>
+ <zip destfile="${dist.dir}/tools/${ant.project.name}.javadoc.zip" basedir="${javadoc.dir}" />
+ </target>
+
+ <target name="jar" depends="compile">
+ <mkdir dir="${dist.dir}" />
+ <jar destfile="${dist.dir}/tools/${ant.project.name}.jar" basedir="${classes.dir}" >
+ <manifest>
+ <attribute name="Main-Class" value="${main-class}" />
+ </manifest>
+ <zipgroupfileset dir="lib/" includes="*.jar" />
+ </jar>
+ </target>
+
+ <target name="run" depends="jar">
+ <java classname="${main-class}" fork="yes" >
+ <classpath>
+ <path refid="classpath" />
+ <path refid="application" />
+ </classpath>
+ </java>
+ </target>
+
+ <target name="test" depends="jar" >
+ <mkdir dir="${junitreport.dir}" />
+ <junit fork="yes" printsummary="yes" failureproperty="junit.failure">
+ <classpath>
+ <path refid="classpath" />
+ <path refid="application" />
+ </classpath>
+
+ <formatter type="xml" />
+
+ <batchtest todir="${junitreport.dir}">
+ <fileset dir="${test.dir}" includes="**/*Test.java" />
+ </batchtest>
+ </junit>
+ <fail if="junit.failure" />
+ </target>
+
+ <target name="junitreport">
+ <junitreport todir="${junitreport.dir}" >
+ <fileset dir="${junitreport.dir}" includes="TEST-*.xml"/>
+ <report todir="${junitreport.dir}" />
+ </junitreport>
+ </target>
+
+ <target name="clean-build" depends="clean,jar" />
+ <target name="main" depends="test" />
+</project>