Permalink
Browse files

Issue 80 - Added library support for the navX-MXP

Added the navX-MXP library as a 3rd party library automatically installed during the `ant deps` build target.
  • Loading branch information...
rhauch committed Jan 2, 2017
1 parent bec7c21 commit bbb11daedacb19539ad837ade5307f35c9062dd2
Showing with 34 additions and 2 deletions.
  1. +1 −0 .gitignore
  2. +3 −0 build-common.xml
  3. +5 −0 build.properties
  4. +21 −2 build.xml
  5. +1 −0 strongback-examples/.classpath
  6. +1 −0 strongback-testing/.classpath
  7. +1 −0 strongback-tests/.classpath
  8. +1 −0 strongback/.classpath
View
@@ -15,6 +15,7 @@ target/
# The 3rd party dependencies should never be committed
libs/wpilib
libs/ctre
libs/navx-mxp
downloads/
.DS_Store/
View
@@ -5,6 +5,7 @@
<property file="${strongback.dir}/build.properties"/>
<property name="wpilib.dir" value="${strongback.dir}/libs/wpilib"/>
<property name="ctre.dir" value="${strongback.dir}/libs/ctre"/>
<property name="navx.dir" value="${strongback.dir}/libs/navx-mxp"/>
<property name="java.compile.arg" value=""/>
<property name="java.source.version" value="1.8"/>
@@ -19,6 +20,7 @@
<property name="project.test.report.dir" value="${project.build.dir}/test-reports"/>
<property name="wpi.libs.dir" value="${wpilib.dir}/java/current/lib"/>
<property name="ctre.libs.dir" value="${ctre.dir}/java/lib"/>
<property name="navx.libs.dir" value="${navx.dir}/roborio/java/lib"/>
<property name="test.libs.dir" value="${strongback.dir}/libs/test"/>
<property name="compile.libs.dir" value="${strongback.dir}/libs"/>
<property name="project.jar.name" value="${ant.project.name}.jar"/>
@@ -38,6 +40,7 @@
<fileset dir="${compile.libs.dir}" includes="**/*.jar" excludes="**/*-sources.jar"/>
<fileset dir="${wpi.libs.dir}" includes="**/*.jar" excludes="**/*-sources.jar"/>
<fileset dir="${ctre.libs.dir}" includes="**/*.jar" excludes="**/*-sources.jar"/>
<fileset dir="${navx.libs.dir}" includes="**/*.jar" excludes="**/*-sources.jar"/>
</path>
<path id="test.class.path">
View
@@ -13,3 +13,8 @@ wpilib.updatesite.url=http://first.wpi.edu/FRC/roborio/release/eclipse
#
ctre.download.url=file:///Users/rhauch/Downloads/CTRE_FRCLibs_NON-WINDOWS.zip
#
# The navX-MXP library is available in multiple ZIP files, but one only has the libraries.
#
navx.download.url=http://www.kauailabs.com/public_files/navx-mxp/navx-mxp-libs.zip
View
@@ -18,6 +18,8 @@
<property file="${wpilib.dir}/wpilib.properties"/>
<property name="ctre.dir" value="libs/ctre"/>
<property name="ctre.libs.dir" value="${ctre.dir}/java/lib"/>
<property name="navx.dir" value="libs/navx-mxp"/>
<property name="navx.libs.dir" value="${navx.dir}/roborio/java/lib"/>
<property name="build.dir" value="build"/>
<target name="help">
@@ -86,6 +88,7 @@
<fileset dir="libs" includes="**/*.jar" excludes="**/*-sources.jar"/>
<fileset dir="${wpi.libs.dir}" includes="**/*.jar" excludes="**/*-sources.jar"/>
<fileset dir="${ctre.libs.dir}" includes="**/*.jar" excludes="**/*-sources.jar"/>
<fileset dir="${navx.libs.dir}" includes="**/*.jar" excludes="**/*-sources.jar"/>
<pathelement path="${classpath}" />
</classpath>
<sourcefiles>
@@ -105,6 +108,7 @@
<group title="" packages="org.strongback.util*:org.strongback.function*:org.strongback.annotation*"/>
<link href="http://docs.oracle.com/javase/8/docs/api/"/>
<link offline="true" href="http://first.wpi.edu/FRC/roborio/release/docs/java/" packagelistLoc="${wpilib.dir}/java/current/javadoc"/>
<link offline="true" href="http://www.kauailabs.com/public_files/navx-mxp/apidocs/java/" packagelistLoc="${navx.dir}/java/docs"/>
</javadoc>
</target>
@@ -154,6 +158,7 @@
<delete dir="${wpilib.dir}" />
<!-- TODO: Uncomment these when we automatically install them -->
<delete dir="${ctre.dir}" />
<delete dir="${navx.dir}" />
</target>
<!-- Remove and clean dependencies -->
@@ -162,7 +167,8 @@
</target>
<!-- Install Dependencies -->
<target name="deps" depends="download-wpilib,download-ctre,clean-downloads" description="Downloads and installs the dependencies required for the build">
<target name="deps" depends="download-wpilib,download-ctre,download-navx,clean-downloads" description="Downloads and installs the dependencies required for the build">
</target>
<!-- Release -->
<target name="release" depends="remove-deps,clean,dist" description="Removes and installs 3rd party libraries, compiles, and builds distribution.">
@@ -249,6 +255,19 @@
</unzip>
</target>
<!-- Download and extract the navX-MXP 3rd party library -->
<target name="check-for-navx">
<condition property="navx-missing">
<not>
<available file="${navx.dir}" type="dir"/>
</not>
</condition>
</target>
<target name="download-navx" depends="check-for-navx" if="navx-missing" >
<echo>Downloading the navX-MXP library and installing into '${navx.dir}'.</echo>
<get src="${navx.download.url}" dest="downloads/navx.zip"/>
<mkdir dir="${navx.dir}"/>
<unzip src="downloads/navx.zip" dest="${ctre.dir}">
</unzip>
</target>
</project>
@@ -7,6 +7,7 @@
<classpathentry kind="lib" path="/libs/wpilib/java/current/lib/opencv.jar" sourcepath="/libs/wpilib/java/current/lib/opencv-sources.jar"/>
<classpathentry kind="lib" path="/libs/wpilib/java/current/lib/cscore.jar" sourcepath="/libs/wpilib/java/current/lib/cscore-sources.jar"/>
<classpathentry kind="lib" path="/libs/ctre/java/lib/TalonSRXLibJava.jar"/>
<classpathentry kind="lib" path="/libs/navx-mxp/roborio/java/lib/navx_frc.jar"/>
<classpathentry kind="lib" path="/libs/test/fest-assert-1.4.jar" sourcepath="/libs/test/fest-assert-1.4-sources.jar"/>
<classpathentry kind="lib" path="/libs/test/fest-util-1.1.6.jar" sourcepath="/libs/test/fest-util-1.1.6-sources.jar"/>
<classpathentry kind="lib" path="/libs/test/junit-4.11.jar" sourcepath="/libs/test/junit-4.11-sources.jar"/>
@@ -10,5 +10,6 @@
<classpathentry kind="lib" path="/libs/wpilib/java/current/lib/opencv.jar" sourcepath="/libs/wpilib/java/current/lib/opencv-sources.jar"/>
<classpathentry kind="lib" path="/libs/wpilib/java/current/lib/cscore.jar" sourcepath="/libs/wpilib/java/current/lib/cscore-sources.jar"/>
<classpathentry kind="lib" path="/libs/ctre/java/lib/TalonSRXLibJava.jar"/>
<classpathentry kind="lib" path="/libs/navx-mxp/roborio/java/lib/navx_frc.jar"/>
<classpathentry kind="output" path="build/classes"/>
</classpath>
@@ -12,6 +12,7 @@
<classpathentry kind="lib" path="/libs/wpilib/java/current/lib/opencv.jar" sourcepath="/libs/wpilib/java/current/lib/opencv-sources.jar"/>
<classpathentry kind="lib" path="/libs/wpilib/java/current/lib/cscore.jar" sourcepath="/libs/wpilib/java/current/lib/cscore-sources.jar"/>
<classpathentry kind="lib" path="/libs/ctre/java/lib/TalonSRXLibJava.jar"/>
<classpathentry kind="lib" path="/libs/navx-mxp/roborio/java/lib/navx_frc.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/strongback"/>
<classpathentry combineaccessrules="false" kind="src" path="/strongback-testing"/>
<classpathentry kind="output" path="build/classes"/>
View
@@ -7,5 +7,6 @@
<classpathentry kind="lib" path="/libs/wpilib/java/current/lib/opencv.jar" sourcepath="/libs/wpilib/java/current/lib/opencv-sources.jar"/>
<classpathentry kind="lib" path="/libs/wpilib/java/current/lib/cscore.jar" sourcepath="/libs/wpilib/java/current/lib/cscore-sources.jar"/>
<classpathentry kind="lib" path="/libs/ctre/java/lib/TalonSRXLibJava.jar"/>
<classpathentry kind="lib" path="/libs/navx-mxp/roborio/java/lib/navx_frc.jar"/>
<classpathentry kind="output" path="build/classes"/>
</classpath>

0 comments on commit bbb11da

Please sign in to comment.