Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ libs/wpilib
downloads/

.DS_Store/

6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
sudo: false
language: java
install: ant deps
script: ant test
jdk:
- oraclejdk8
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ If you want to build Strongback locally, you will need to have installed JDK 1.8

$ ant test

This will download the appropriate version of WPILib and install it into the `libs` directory, and then compile all the code and run the unit tests. Once this works, you know your environment is set up correctly, and you can proceed to import the projects into your Eclipse workspace and view or make changes to the library and/or tests using Eclipse. At any time, you can run Ant to compile, test, or create distribution files.
This will download the appropriate version of WPILib and install it into the `libs` directory, and then compile all the code and run the unit tests. Once this works, you know your environment is set up correctly, and you can proceed to import the projects into your Eclipse workspace and view or make changes to the library and/or tests using Eclipse. At any time, you can run Ant to compile, test, or create distribution files. For help with Ant, run `ant help` to see the available targets and their descriptions.

If you have any problems getting this far, please check our [developers discussion forum](https://groups.google.com/forum/#!forum/strongback-dev) to see if others are having similar problems. If you see no relevant discussion, post a question with the details about your platform, the versions of the tools, what you are trying to do, and what result you are getting.

Expand Down
4 changes: 2 additions & 2 deletions build-common.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<copy todir="${project.output.dir}">
<fileset dir="${project.source.dir}" includes="**/*.xml,**/*.properties,**/*.txt,**/*.ico" />
</copy>
<copy todir="${project.output.dir}" failonerror="false" quiet="true">
<copy todir="${project.output.dir}" failonerror="false">
<fileset dir="${project.resources.dir}"/>
</copy>
</target>
Expand All @@ -92,7 +92,7 @@
<copy todir="${project.test.output.dir}">
<fileset dir="${project.test.source.dir}" includes="**/*.xml,**/*.properties,**/*.txt,**/*.ico" />
</copy>
<copy todir="${project.output.dir}" failonerror="false" quiet="true">
<copy todir="${project.output.dir}" failonerror="false">
<fileset dir="${project.test.resources.dir}"/>
</copy>
</target>
Expand Down
34 changes: 18 additions & 16 deletions build.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="strongback" default="dist" xmlns:antcontrib="antlib:net.sf.antcontrib">
<project name="strongback" default="dist">
<!-- Add Ant-Contrib -->
<taskdef uri="antlib:net.sf.antcontrib"
resource="net/sf/antcontrib/antlib.xml"
classpath="libs/build/ant-contrib-1.0b3.jar"/>
<taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath>
<pathelement location="libs/ant/ant-contrib-1.0b3.jar"/>
</classpath>
</taskdef>

<import file="dependencies.xml"/>
<tstamp>
Expand Down Expand Up @@ -33,8 +35,8 @@
<echo>There are a few other targets that are automatically run when the above targets are used,</echo>
<echo>but which you may want to run manually:</echo>
<echo></echo>
<echo> dep Install the dependencies required to compile, run tests, and create the distribution.</echo>
<echo> remove-dep Remove the dependencies installed by `dep`</echo>
<echo> deps Install the dependencies required to compile, run tests, and create the distribution.</echo>
<echo> remove-deps Remove the dependencies installed by `dep`</echo>
<echo></echo>
</target>

Expand All @@ -45,19 +47,19 @@
</antcall>
</target>

<target name="compile" depends="dep" description="Compiles source code">
<target name="compile" depends="deps" description="Compiles source code">
<antcall target="strongback.all">
<param name="dependency.target" value="compile"/>
</antcall>
</target>

<target name="test" depends="dep" description="Run the tests">
<target name="test" depends="deps" description="Run the tests">
<antcall target="strongback.all">
<param name="dependency.target" value="test"/>
</antcall>
</target>

<target name="jar" depends="dep" description="Creates the JARs">
<target name="jar" depends="deps" description="Creates the JARs">
<antcall target="strongback.all">
<param name="dependency.target" value="jar"/>
</antcall>
Expand Down Expand Up @@ -137,7 +139,7 @@
</target>

<!-- Remove and clean dependencies -->
<target name="remove-dep" depends="clean-downloads" description="Removes the locally-installed dependencies">
<target name="remove-deps" depends="clean-downloads" description="Removes the locally-installed dependencies">
<!-- !!!! Always remove the *local* installation; never the one in ${wpilib.dir} !!!! -->
<delete dir="libs/wpilib" />
</target>
Expand All @@ -148,7 +150,7 @@
</target>

<!-- Install Dependencies -->
<target name="dep" depends="download-wpilib,clean-downloads" description="Downloads and installs the dependencies required for the build">
<target name="deps" depends="download-wpilib,clean-downloads" description="Downloads and installs the dependencies required for the build">
</target>

<!-- Check if the WPI directory exists -->
Expand All @@ -167,17 +169,17 @@
<!-- Download the 'site.xml' file that contains the URL to the feature we want, and get that URL -->
<get src="${wpilib.updatesite.url}/site.xml" dest="downloads/site.xml"/>
<xmlproperty file="downloads/site.xml" collapseAttributes="true" semanticAttributes="true" keepRoot="true"/>
<antcontrib:for list="${site.feature.url}" param="url">
<for list="${site.feature.url}" param="url">
<sequential>
<antcontrib:if>
<if>
<contains string="@{url}" substring="java.feature"/>
<then>
<property name="javaFeatureUrl" value="@{url}"/>
</then>
</antcontrib:if>
</if>
</sequential>
</antcontrib:for>
<antcontrib:propertyregex property="wpilib.version" input="${javaFeatureUrl}" regexp="_([\d.]*).jar" select="\1" casesensitive="false" />
</for>
<propertyregex property="wpilib.version" input="${javaFeatureUrl}" regexp="_([\d.]*).jar" select="\1" casesensitive="false" />
<!-- The feature URL can be converted to the plugin URL -->
<loadresource property="javaPluginUrl">
<propertyresource name="javaFeatureUrl"/>
Expand Down
Binary file added libs/ant/ant-contrib-1.0b3.jar
Binary file not shown.