Skip to content

Commit 024afee

Browse files
authored
Merge pull request #88 from rhauch/2017-beta
Added support for 2017 WPILib for Java
2 parents c5d17f6 + 67e49a4 commit 024afee

File tree

24 files changed

+256
-287
lines changed

24 files changed

+256
-287
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ deploy/
1212
target/
1313
*.class
1414

15-
# The wpilib directory should never be committed
15+
# The 3rd party dependencies should never be committed
1616
libs/wpilib
17+
libs/ctre
18+
libs/navx-mxp
1719
downloads/
1820

1921
.DS_Store/

.travis.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
sudo: false
22
language: java
3+
before_install:
4+
- ant -version
5+
- wget http://apache.mirrors.pair.com//ant/binaries/apache-ant-1.10.0-bin.tar.gz
6+
- tar -xf apache-ant-1.10.0-bin.tar.gz
7+
- export ANT_HOME=$PWD/apache-ant-1.10.0
8+
- export PATH=$ANT_HOME/bin:$PATH
9+
- ant -version
10+
311
install: ant deps
412
script: ant test
513
jdk:

CONTRIBUTORS.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
Braden Steffaniak
21
Matthew Alonso
2+
Zach Anderson
33
Nathan Brown
4+
Adam Gausmann
5+
Colin Hauch
46
Randall Hauch
5-
Zach Anderson
7+
Filip Kernan
68
Rothanak So
7-
Filip Kernan
9+
Braden Steffaniak

COPYRIGHT.txt

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1 @@
1-
Copyright 2015, Strongback and individual contributors by the @authors tag.
2-
3-
The following have contributed to the Strongback Java codebase.
4-
5-
Randall Hauch <[email protected]>
6-
Zach Anderson <[email protected]>
7-
Nathan Brown <[email protected]>
8-
Adam Gausmann <[email protected]>
9-
Colin Hauch <[email protected]>
1+
Copyright 2015-2017, Strongback and individual contributors identified by the @authors tags and in the CONTRIBUTORS file.

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Strongback is a new open source software library that makes your robot code ligh
2828

2929
# Building locally
3030

31-
If you want to build Strongback locally, you will need to have installed JDK 1.8, Eclipse Mars (version 4.5.0 or later), Ant 1.9.2 or later, and Git 2.2.1 or later. Then, use Git to clone this repository (or your GitHub fork). Before importing into Eclipse, build the code and run the unit tests using Ant:
31+
If you want to build Strongback locally, you will need to have installed JDK 1.8, Eclipse Mars (version 4.5.0 or later), Ant 1.10.0 or later, and Git 2.2.1 or later. Then, use Git to clone this repository (or your GitHub fork). Before importing into Eclipse, build the code and run the unit tests using Ant:
3232

3333
$ ant test
3434

@@ -41,8 +41,8 @@ If you have any problems getting this far, please check our [developers discussi
4141
To release a new version of Strongback:
4242

4343
1. Change the `strongback.properties` file to reference the correct version number, and commit that to the repository.
44-
1. Build the distribution by running `ant clean dist` and verifying it completed correctly.
45-
1. Go to the [Strongback releases page](https://github.com/strongback/strongback-java/releases) and draft a new release, filling in the correct release candidate version number as the tag (e.g., `v1.0.0.RC1` for "release candidate 1") and giving an appropriate release title (e.g., `1.0.0 Release Candidate 1`) and description, and uploading the ZIP and compressed TAR file in the `build` directory. Then check "This is a pre-release" and press "Publish Release".
44+
1. Build the distribution by running `ant release` and verifying it completed correctly.
45+
1. Go to the [Strongback releases page](https://github.com/strongback/strongback-java/releases) and draft a new release, filling in the correct release candidate version number as the tag (e.g., `v2017.1.0.RC1` for "release candidate 1") and giving an appropriate release title (e.g., `2017.1.0.RC1`) and description, and uploading the ZIP and compressed TAR file in the `build` directory. Then check "This is a pre-release" and press "Publish Release".
4646
1. Notify the developer forum so that other community members can test the release candidate by downloading and unpacking the pre-release distribution into their local home directory, using it in one or more robot codebases, and verifying the robots behave as expected. Each community member that tests it locally should respond to your forum post with their results.
47-
1. If the pre-release distribution has problems that need to be fixed, they should be reported, fixed, and merged into the correct branch, and then go to Step 3 using a new pre-release tag (e.g., `v1.0.0.RC2`) and title (e.g., `1.0.0 Release Candidate 1`).
48-
1. When enough community members have verified the pre-release distribution is acceptable, go to the [Strongback releases page](https://github.com/strongback/strongback-java/releases) and create a new release with the same tag as the pre-release, but with the appropriate release title (e.g., `1.0.0`) and description. Do not check "This is a pre-release" and press "Publish Release".
47+
1. If the pre-release distribution has problems that need to be fixed, they should be reported, fixed, and merged into the correct branch, and then go to Step 3 using a new pre-release tag (e.g., `v2017.1.0.RC2`) and title (e.g., `2017.1.0.RC2`).
48+
1. When enough community members have verified the pre-release distribution is acceptable, go to the [Strongback releases page](https://github.com/strongback/strongback-java/releases) and create a new release with the same tag as the pre-release, but with the appropriate release tag (e.g., `v2017.1.0`), title (e.g., `2017.1.0`) and description. Do not check "This is a pre-release" and press "Publish Release".

ant/strongback/build.xml

Lines changed: 10 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,19 @@
1111
<property file="${user.home}/strongback/java/ant/build.properties" />
1212

1313
<import file="${wpilib.ant.dir}/build.xml" />
14-
15-
<!-- Define the classpaths -->
16-
<path id="compile.classpath">
17-
<fileset dir="${strongback.home}/java/lib" includes="**/*.jar" excludes="**/*-sources.jar" />
18-
<fileset dir="${user.home}/wpilib/java/${version}/lib" includes="**/*.jar" excludes="**/*-sources.jar" />
19-
<pathelement path="${classpath}" />
20-
</path>
2114

15+
<!--
16+
The Strongback and 3rd party libraries are installed (via the Strongback CLI) into the
17+
WPILib's `user/java/lib` directory and therefore are found, used, and deployed during the
18+
WPILib's standard Ant build process.
19+
20+
However, WPILib's build does not support unit tests, so this file defines Ant targets
21+
related only for unit testing. Thus, a robot project that uses Strongback at runtime
22+
and has no tests need not use this Ant file.
23+
-->
24+
2225
<!-- Define a classpath for unit testing -->
2326
<path id="junit.classpath">
24-
<fileset dir="${strongback.home}/java/lib" includes="**/*.jar" excludes="**/*-sources.jar" />
2527
<fileset dir="${strongback.home}/java/lib-tests" includes="**/*.jar" excludes="**/*-sources.jar" />
2628
<pathelement location="${build.dir}" />
2729
<pathelement path="${classpath}" />
@@ -37,46 +39,6 @@
3739
<ant antfile="${wpilib.ant.dir}/build.xml" target="clean" />
3840
</target>
3941

40-
<target name="compile" description="Compile the source code.">
41-
<mkdir dir="${build.dir}" />
42-
<javac srcdir="${src.dir}" destdir="${build.dir}" includeantruntime="false">
43-
<classpath refid="compile.classpath" />
44-
</javac>
45-
<copy todir="${build.dir}">
46-
<fileset dir="${src.dir}" includes="**/*.xml,**/*.properties,**/*.txt,**/*.ico" />
47-
</copy>
48-
<copy todir="${build.dir}" failonerror="false" quiet="true">
49-
<fileset dir="${resources.dir}" />
50-
</copy>
51-
</target>
52-
53-
<target name="jar" depends="compile">
54-
<echo>Making jar ${dist.jar}.</echo>
55-
<mkdir dir="${dist.dir}" />
56-
<mkdir dir="${build.jars}" />
57-
58-
<echo>Copying jars from ${strongback.classpath} to ${build.jars}.</echo>
59-
<copy todir="${build.jars}" flatten="true">
60-
<path>
61-
<pathelement path="${strongback.classpath}" />
62-
</path>
63-
</copy>
64-
65-
<jar destfile="${dist.jar}" update="false">
66-
<manifest>
67-
<attribute name="Main-Class" value="edu.wpi.first.wpilibj.RobotBase" />
68-
<attribute name="Robot-Class" value="${robot.class}" />
69-
<attribute name="Class-Path" value="." />
70-
</manifest>
71-
72-
<fileset dir="${build.dir}" includes="**/*.class" />
73-
74-
<zipgroupfileset dir="${build.jars}">
75-
<include name="**/*.jar" />
76-
</zipgroupfileset>
77-
</jar>
78-
</target>
79-
8042
<!-- Check if there are any JUnit Tests -->
8143
<target name="if-tests">
8244
<condition property="tests-exists">

build-common.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
<property name="strongback.dir" location=".."/>
55
<property file="${strongback.dir}/build.properties"/>
66
<property name="wpilib.dir" value="${strongback.dir}/libs/wpilib"/>
7+
<property name="ctre.dir" value="${strongback.dir}/libs/ctre"/>
8+
<property name="navx.dir" value="${strongback.dir}/libs/navx-mxp"/>
79

810
<property name="java.compile.arg" value=""/>
911
<property name="java.source.version" value="1.8"/>
@@ -17,6 +19,8 @@
1719
<property name="project.test.output.dir" value="${project.build.dir}/test-classes"/>
1820
<property name="project.test.report.dir" value="${project.build.dir}/test-reports"/>
1921
<property name="wpi.libs.dir" value="${wpilib.dir}/java/current/lib"/>
22+
<property name="ctre.libs.dir" value="${ctre.dir}/java/lib"/>
23+
<property name="navx.libs.dir" value="${navx.dir}/roborio/java/lib"/>
2024
<property name="test.libs.dir" value="${strongback.dir}/libs/test"/>
2125
<property name="compile.libs.dir" value="${strongback.dir}/libs"/>
2226
<property name="project.jar.name" value="${ant.project.name}.jar"/>
@@ -35,6 +39,8 @@
3539
<pathelement location="${project.output.dir}" />
3640
<fileset dir="${compile.libs.dir}" includes="**/*.jar" excludes="**/*-sources.jar"/>
3741
<fileset dir="${wpi.libs.dir}" includes="**/*.jar" excludes="**/*-sources.jar"/>
42+
<fileset dir="${ctre.libs.dir}" includes="**/*.jar" excludes="**/*-sources.jar"/>
43+
<fileset dir="${navx.libs.dir}" includes="**/*.jar" excludes="**/*-sources.jar"/>
3844
</path>
3945

4046
<path id="test.class.path">

build.properties

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
1-
strongback.version=1.2.1
1+
strongback.version=2017.1.0.RC1
22
#
33
# The build will download a specific version of the WPILib given by the following URL
44
# and install it into the 'libs/wpilib' folder. To use a different version of WPILib,
55
# replace the value with the URL of the WPILib Eclipse Update Site
66
#
7-
wpilib.updatesite.url=http://first.wpi.edu/FRC/roborio/release/eclipse
7+
wpilib.updatesite.url=http://first.wpi.edu/FRC/roborio/beta/eclipse/
88

9+
#
10+
# Starting in 2017, WPILib will no longer have built-in support for the TalonSRX
11+
# from Cross the Road Electronics (CTRE). Instead, the `CANTalon` class and associated
12+
# functionality is available directly from CTRE as a separate JAR.
13+
#
14+
ctre.download.url=http://www.ctr-electronics.com/downloads/lib/CTRE_FRCLibs_NON-WINDOWS.zip
15+
16+
#
17+
# The navX-MXP library is available in a ZIP file that has only the Java and C++ libraries.
18+
#
19+
navx.download.url=http://www.kauailabs.com/public_files/navx-mxp/navx-mxp-libs.zip

0 commit comments

Comments
 (0)