Skip to content

Commit 8280c09

Browse files
committed
Added support for automated continuous integration using Travis-CI.org
1 parent 40540e6 commit 8280c09

File tree

6 files changed

+28
-19
lines changed

6 files changed

+28
-19
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ libs/wpilib
1717
downloads/
1818

1919
.DS_Store/
20+

.travis.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
sudo: false
2+
language: java
3+
install: ant deps
4+
script: ant test
5+
jdk:
6+
- oraclejdk8

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ If you want to build Strongback locally, you will need to have installed JDK 1.8
2323

2424
$ ant test
2525

26-
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.
26+
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.
2727

2828
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.
2929

build-common.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
<copy todir="${project.output.dir}">
7171
<fileset dir="${project.source.dir}" includes="**/*.xml,**/*.properties,**/*.txt,**/*.ico" />
7272
</copy>
73-
<copy todir="${project.output.dir}" failonerror="false" quiet="true">
73+
<copy todir="${project.output.dir}" failonerror="false">
7474
<fileset dir="${project.resources.dir}"/>
7575
</copy>
7676
</target>
@@ -92,7 +92,7 @@
9292
<copy todir="${project.test.output.dir}">
9393
<fileset dir="${project.test.source.dir}" includes="**/*.xml,**/*.properties,**/*.txt,**/*.ico" />
9494
</copy>
95-
<copy todir="${project.output.dir}" failonerror="false" quiet="true">
95+
<copy todir="${project.output.dir}" failonerror="false">
9696
<fileset dir="${project.test.resources.dir}"/>
9797
</copy>
9898
</target>

build.xml

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
<?xml version="1.0" encoding="ISO-8859-1"?>
2-
<project name="strongback" default="dist" xmlns:antcontrib="antlib:net.sf.antcontrib">
2+
<project name="strongback" default="dist">
33
<!-- Add Ant-Contrib -->
4-
<taskdef uri="antlib:net.sf.antcontrib"
5-
resource="net/sf/antcontrib/antlib.xml"
6-
classpath="libs/build/ant-contrib-1.0b3.jar"/>
4+
<taskdef resource="net/sf/antcontrib/antlib.xml">
5+
<classpath>
6+
<pathelement location="libs/ant/ant-contrib-1.0b3.jar"/>
7+
</classpath>
8+
</taskdef>
79

810
<import file="dependencies.xml"/>
911
<tstamp>
@@ -33,8 +35,8 @@
3335
<echo>There are a few other targets that are automatically run when the above targets are used,</echo>
3436
<echo>but which you may want to run manually:</echo>
3537
<echo></echo>
36-
<echo> dep Install the dependencies required to compile, run tests, and create the distribution.</echo>
37-
<echo> remove-dep Remove the dependencies installed by `dep`</echo>
38+
<echo> deps Install the dependencies required to compile, run tests, and create the distribution.</echo>
39+
<echo> remove-deps Remove the dependencies installed by `dep`</echo>
3840
<echo></echo>
3941
</target>
4042

@@ -45,19 +47,19 @@
4547
</antcall>
4648
</target>
4749

48-
<target name="compile" depends="dep" description="Compiles source code">
50+
<target name="compile" depends="deps" description="Compiles source code">
4951
<antcall target="strongback.all">
5052
<param name="dependency.target" value="compile"/>
5153
</antcall>
5254
</target>
5355

54-
<target name="test" depends="dep" description="Run the tests">
56+
<target name="test" depends="deps" description="Run the tests">
5557
<antcall target="strongback.all">
5658
<param name="dependency.target" value="test"/>
5759
</antcall>
5860
</target>
5961

60-
<target name="jar" depends="dep" description="Creates the JARs">
62+
<target name="jar" depends="deps" description="Creates the JARs">
6163
<antcall target="strongback.all">
6264
<param name="dependency.target" value="jar"/>
6365
</antcall>
@@ -137,7 +139,7 @@
137139
</target>
138140

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

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

154156
<!-- Check if the WPI directory exists -->
@@ -167,17 +169,17 @@
167169
<!-- Download the 'site.xml' file that contains the URL to the feature we want, and get that URL -->
168170
<get src="${wpilib.updatesite.url}/site.xml" dest="downloads/site.xml"/>
169171
<xmlproperty file="downloads/site.xml" collapseAttributes="true" semanticAttributes="true" keepRoot="true"/>
170-
<antcontrib:for list="${site.feature.url}" param="url">
172+
<for list="${site.feature.url}" param="url">
171173
<sequential>
172-
<antcontrib:if>
174+
<if>
173175
<contains string="@{url}" substring="java.feature"/>
174176
<then>
175177
<property name="javaFeatureUrl" value="@{url}"/>
176178
</then>
177-
</antcontrib:if>
179+
</if>
178180
</sequential>
179-
</antcontrib:for>
180-
<antcontrib:propertyregex property="wpilib.version" input="${javaFeatureUrl}" regexp="_([\d.]*).jar" select="\1" casesensitive="false" />
181+
</for>
182+
<propertyregex property="wpilib.version" input="${javaFeatureUrl}" regexp="_([\d.]*).jar" select="\1" casesensitive="false" />
181183
<!-- The feature URL can be converted to the plugin URL -->
182184
<loadresource property="javaPluginUrl">
183185
<propertyresource name="javaFeatureUrl"/>

libs/ant/ant-contrib-1.0b3.jar

219 KB
Binary file not shown.

0 commit comments

Comments
 (0)