Skip to content

Commit

Permalink
Update README, remove old docs
Browse files Browse the repository at this point in the history
  • Loading branch information
JaciBrunning committed Jun 24, 2018
1 parent 63b7f0b commit 7e09449
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 239 deletions.
41 changes: 14 additions & 27 deletions README.md
Expand Up @@ -6,9 +6,9 @@ robotics competition to produce and build their code.

GradleRIO works with Java and C++ (and others!), on Windows, Mac and Linux. GradleRIO automatically fetches WPILib, CTRE Toolsuite (Talon SRX) and NavX libraries, and you can even add your own libraries!

GradleRIO will not only deploy to your RoboRIO, but also to Coprocessors like the Raspberry Pi, Jetson and Pine64. You can even deploy to multiple targets at the same time!
For 2019+, GradleRIO is the official build system for the _FIRST_ Robotics Competition! The officially supported IDE is Visual Studio Code (VSCode), using the WPILib extension.

GradleRIO will work with Eclipse or IntelliJ IDEA (for Java), and CLion or Visual Studio (for C++). Don't worry, you don't need an IDE if you don't want one, you can use Visual Studio Code, Notepad++, Sublime Text, Vim, or whatever you want, since all builds are done from the command line.
Other IDEs like IntelliJ IDEA, Eclipse, Visual Studio, and CLion are also supported, unofficially. You may also use this tool exclusively from the command line, allowing use of any IDE or text editor (like Sublime Text, Atom or Vim).

## Commands
Windows Users: It is recommended to use Powershell instead of CMD.
Expand All @@ -23,46 +23,37 @@ Windows Users: It is recommended to use Powershell instead of CMD.
**At Competition? Connected to the Robot?** Run with the `--offline` flag. e.g. `./gradlew build deploy --offline`

## IDE Commands
_These IDEs are unofficially supported, so CSA support is not guaranteed. It is recommended to use VSCode, however these options are available if you wish._
- ```./gradlew idea``` will generate IDE files for IntelliJ IDEA (java)
- ```./gradlew eclipse``` will generate IDE files for Eclipse (java)
- ```./gradlew <component>VisualStudio``` will generate IDE files for the C/C++ component named `<component>` for Visual Studio (C++)
- ```./gradlew clion``` will generate IDE files for Clion (C++). Be warned that Clion support is hacky as Clion does not natively support Gradle.

## Getting Started
Read the docs [here](docs/) to get started. They are much more descriptive than this README.

## Download
To get GradleRIO, download the [Quickstart Zip](Quickstart.zip) and unzip it to your project directory.
Please note that your java files must be in `src/main/java`, not just `src/`. C++ files are in `src/cpp` and `src/include`.

**C++ Users**: Run `./gradlew installToolchain` in order to install the FRC Toolchain.
**Java Users**: The Java installation will be automatically deployed to your RoboRIO. You do not need to use the Java Installer.

## Upgrading
To upgrade your version of GradleRIO, you must first upgrade gradle. Near the bottom of your build.gradle, change the wrapper version to the following, and then run `./gradlew wrapper`:
```gradle
task wrapper(type: Wrapper) {
gradleVersion = '4.4'
gradleVersion = '4.7'
}
```

Next, replace the version in the plugin line (only change the GradleRIO line):
```gradle
plugins {
// ... other plugins ...
id "jaci.openrio.gradle.GradleRIO" version "2018.02.17"
id "jaci.openrio.gradle.GradleRIO" version "2018.06.21"
}
```

## Implementation Details
NOTE: This section is for advanced users. View the quickstart and examples for your language to get started.
**NOTE: This section is for advanced users. View the examples for your language to get started.**

### Full Spec
```gradle
deploy {
targets {
target('roborio', RoboRIO) {
team = 5333
team = getTeamOrDefault(5333)
// Other values can be edited through EmbeddedTools.
// See https://github.com/JacisNonsense/EmbeddedTools#spec
}
Expand All @@ -76,7 +67,7 @@ deploy {
jvmArgs << '-Xmx=128m' // Set more JVM Arguments. Optional.
arguments << 'myCustomArgs' // The command-line arguments to launch your jar with. Optional.
debug = true // Enable to enable java debugging on the RoboRIO. Default: false
debug = getDebugOrDefault(false) // Enable to enable java debugging on the RoboRIO. Default: false
debugPort = 8348 // Set the debugging port. Default: 8348
robotCommand = './myOtherProgram' // Set the contents of robotCommand. Optional, usually created depending on above values.
Expand All @@ -90,7 +81,7 @@ deploy {
component = 'myFrcBinary' // The name of the component you wish to build (required).
arguments << 'myCustomArgs' // The command-line arguments to launch your jar with. Optional.
debug = true // Enable to enable java debugging on the RoboRIO. Default: false
debug = getDebugOrDefault(false) // Enable to enable cpp debugging on the RoboRIO. Default: false
debugPort = 8348 // Set the debugging port. Default: 8348
robotCommand = './myOtherProgram' // Set the contents of robotCommand. Optional, usually created depending on above values.
Expand Down Expand Up @@ -130,7 +121,6 @@ dependencies {
compile wpilib()
compile navx()
compile ctre()
// compile ctreLegacy() // NOTE: Legacy Toolsuite. Use above ctre() if you're not sure.
}
// Java only. Setup your Jar File.
Expand All @@ -150,15 +140,12 @@ model {
source {
srcDir 'src/main/cpp'
}
// Add the libraries you wish to use in your NATIVE project.
// WPILib adds WPILibJ, NTCore, OpenCV, CSCore among others.
// CTRE adds the CTRE Toolsuite (i.e. Talon SRX)
// NavX adds the NavX IMU library.
lib library: "wpilib"
lib library: "navx"
lib library: "ctre"
// lib library: "ctre_legacy" // NOTE: Legacy Toolsuite. Use above ctre() if you're not sure.
}
// Add the libraries you wish to use in your NATIVE project.
// WPILib adds WPILibJ, NTCore, OpenCV, CSCore among others.
// CTRE adds the CTRE Toolsuite (i.e. Talon SRX)
// NavX adds the NavX IMU library.
useLibrary(it, "wpilib", "navx", "ctre")
}
}
}
27 changes: 0 additions & 27 deletions docs/01-installing-gradlerio.md

This file was deleted.

27 changes: 0 additions & 27 deletions docs/02-updating-gradlerio.md

This file was deleted.

16 changes: 0 additions & 16 deletions docs/03-using-an-ide.md

This file was deleted.

104 changes: 0 additions & 104 deletions docs/04-customizing-gradlerio.md

This file was deleted.

38 changes: 0 additions & 38 deletions docs/05-debugging.md

This file was deleted.

0 comments on commit 7e09449

Please sign in to comment.