Added a withoutTests gradle flag for CMAKE feature parity

Change-Id: I7b76c3a616e66cb8e3372b01a61049a7f1406503
This commit is contained in:
Fredric Silberberg
2015-12-20 18:05:06 -05:00
parent 7528b6b8bf
commit 2a43813d14
2 changed files with 7 additions and 2 deletions

View File

@@ -26,6 +26,9 @@ To build just the Native or ARM version, you must access the approriate subproje
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.
## Testing
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.
## Publishing
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):
@@ -47,4 +50,4 @@ Most downstream projects that run on the desktop do not depend on the `platform_
./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`.
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`.

View File

@@ -219,7 +219,9 @@ project(':native') {
throw new GradleException("ntcore does not support building on ${OperatingSystem.current().getFamilyName()}.")
}
apply from: '../test/tests.gradle'
if (!project.hasProperty("withoutTests")) {
apply from: '../test/tests.gradle'
}
if (includeJava) {
apply from: '../java/java.gradle'