commit | f7bd1c2e7c6385f8196f3c3149bbdee00bd140b0 | [log] [tgz] |
---|---|---|
author | Brian Silverman <brian@peloton-tech.com> | Thu Dec 24 16:07:11 2015 -0800 |
committer | Brian Silverman <brian@peloton-tech.com> | Thu Dec 24 16:07:11 2015 -0800 |
tree | 4bd6d47754858ecc57caec14127f563a1d263720 |
Squashed 'third_party/ntcore_2016/' content from commit d8de5e4 Change-Id: Id4839f41b6a620d8bae58dcf1710016671cc4992 git-subtree-dir: third_party/ntcore_2016 git-subtree-split: d8de5e4f19e612e7102172c0dbf152ce82d3d63a
ntcore is the reimplementation of the NetworkTables protocol for both Java and C++, communicating with the former by way of a JNI interface. ntcore implements v3 of the NetworkTables spec.
To build ntcore, a few requirements must be met:
-std=c++11
language flag.Gradle is the main build system used by ntcore. All tasks are run with the gradlew
wrapper, which is included in the root of the repository. All targets that can be accomplished by Gradle are referred to as tasks. The main task available is build
. To run Gradle, cd into the build directory and run:
./gradlew build
To build just the Native or ARM version, you must access the approriate subproject and build just that version. For example:
./gradlew :arm:build # Builds just the arm version of ntcore ./gradlew :native:build # Builds just the native version of ntcore
The native version of ntcore will run tests on build. The arm version will not, as the current platform likely does not allow running of an ARM binary.
By default, tests will be built for the x86 and x64 versions of ntcore, and will be run during any execution of the build
or publish
tasks. To skip building and running the tests, use the -PwithoutTests
command line flag when running Gradle.
To use ntcore in downstream projects as a Maven-style dependency, use the publish
command. This will publish four artifacts, where platform_name is your current platform (windows, mac, linux):
These are published to ~/releases/maven/development. To publish to a different repo, specify the -Prepo=repo_name
flag. Valid repos are:
Most downstream projects that run on the desktop do not depend on the platform_name
classifier version of ntcore. Rather, they depend on a version with the desktop
classifier. Normally, this is a version of ntcore built by the FRC Build server that includes binaries for the 3 major operating systems (Windows, Mac, Linux) and 2 major CPU architectures (x86, x86_64). However, if you are locally testing changes to ntcore, you may want to build a version with the :desktop
classifier for use on your current platform. To do this, specify the -PmakeDesktop
flag when publishing. For example:
./gradlew publish -PmakeDesktop
When you do a publish of ntcore locally, regardless of whether -PmakeDesktop
is found, the locally built copy will override all references to networktables dependencies from the FRC Maven server. To undo this, you must delete ~/releases/maven/<repo>/edu/wpi/first/wpilib/networktables
.