• Stars
    star
    259
  • Rank 157,641 (Top 4 %)
  • Language
    Java
  • License
    MIT License
  • Created almost 10 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The official gradle plugin for the FIRST Robotics Competition

CI

GradleRIO

GradleRIO is a powerful Gradle Plugin that allows teams competing in the FIRST 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, Tools, and Vendor Libraries.

For 2019+, GradleRIO is the official build system for the FIRST Robotics Competition! The officially supported IDE is Visual Studio Code (VS Code), using the WPILib Extension.

frc-docs is the best place for documentation: https://docs.wpilib.org/en/stable/

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).

Getting Started - Creating a new project

With Visual Studio Code (recommended)

For getting started with VS Code, please see the frc-docs documentation: https://docs.wpilib.org/en/stable/docs/zero-to-robot/introduction.html

Without Visual Studio Code

Follow the installation instructions on frc-docs: https://docs.wpilib.org/en/stable/docs/zero-to-robot/step-2/wpilib-setup.html Note that the offline installer isn't required, but will save you a ton of time and is highly recommended.

WPILibUtility Standalone Project Builder WPILib provides a standalone project builder that provides the same interface as VS Code, without having to use VS Code.

If you've used the installer, find and run wpilibutility in C:\Users\Public\wpilib\<YEAR>\utility (windows), or ~/wpilib/<YEAR>/utility(mac/linux). Note that mac users will have to extract the .tar.gz file, then run. Alternatively, download it from the VSCode-WPILib releases, extract it, and run it: https://github.com/wpilibsuite/vscode-wpilib/releases

Use the WPILib Utility whenever you want to create a new project.

Adding Vendor Libraries

With Visual Studio Code

Open the command palette with CTRL + SHIFT + P, or by clicking the WPILib icon. Open WPILib: Manage Vendor Libraries, Install new libraries (online), and paste the vendor-provided JSON url.

Without Visual Studio Code

Create a folder vendordeps in your project directory if it doesn't already exist. Download the JSON file from the vendor-provided URL, and save it to the vendordeps folder. This can be done by running ./gradlew vendordep --url=<vendor url here> in a project.

Commands

Windows Users: It is recommended to use Powershell instead of CMD. You can switch to powershell with powershell

General

  • ./gradlew build will build your robot code (and run unit tests if present).

  • ./gradlew deploy will build and deploy your code.

  • ./gradlew installRoboRioToolchain will install the C++ Toolchains for your system (required for C++).

Tools

  • ./gradlew Glass will launch Glass, a data visualization tool similar to the SimGUI.
  • ./gradlew ShuffleBoard will launch Shuffleboard, the 2018 replacement for SmartDashboard.
  • ./gradlew SmartDashboard will launch Smart Dashboard (note: SmartDashboard is legacy software, use ShuffleBoard instead!).
  • ./gradlew RobotBuilder will launch Robot Builder, a tool for generating robot projects and source files.
  • ./gradlew OutlineViewer will launch Outline Viewer, for viewing NetworkTables.
  • ./gradlew PathWeaver will launch PathWeaver, a tool for generating motion profiles using WPILib's trajectories and splines.

At Competition? Connected to the Robot? Run with the --offline flag. e.g. ./gradlew deploy --offline

IDE Support

Visual Studio Code:

VS Code is fully supported by GradleRIO for FRC. To use it, use the WPILib VS Code extension. See frc-docs for instructions.

IntelliJ IDEA:

IntelliJ IDEA support is unofficial in the FRC sense, but is well supported by the Gradle team. CSA Support isn't guaranteed, so make sure you're prepared to fix any issues yourself if you're at an event.

To import a gradle project into IntelliJ IDEA please do one of the following:

  • In the welcome screen click Import Project and select the build.gradle file of the project.
  • Click Open on the welcome screen or File - Open while you have another project open and select the build.gradle file of the project. IntelliJ will then prompt you if you would like to open it as a project, click Open as Project

IntelliJ may ask to import the Gradle project in the bottom right of the IDE, simple click Import Changes to import it.

Please see the IntelliJ IDEA help page on gradle for help: https://www.jetbrains.com/help/idea/gradle.html

Eclipse

Eclipse support is unofficial in the FRC sense, but is well supported by the Gradle team. CSA Support isn't guaranteed, so make sure you're prepared to fix any issues yourself if you're at an event. Eclipse is only supported for JAVA (not C++)

First install buildship, the gradle plugin made by Eclipse for the Eclipse IDE. Installation instructions can be found here: https://github.com/eclipse/buildship/blob/master/docs/user/Installation.md

Once installed, navigate to File - Importโ€ฆ - Gradle and select Gradle Project.

Press the Next > button, then specify the root directory of the project. Press Finish once to finish the import, and Finish again to confirm it.

Please see the buildship github page for help (specifically the user documentation and the forums): https://github.com/eclipse/buildship

Visual Studio 2017 Community / Full (not Visual Studio Code)

VS2017 support is unofficial in the FRC sense, but is well supported by the Gradle team. CSA Support isn't guaranteed, so make sure you're prepared to fix any issues yourself if you're at an event.

To start with, you must apply the visual-studio plugin to build.gradle. In your build.gradle, put the following code in the plugins {} block.

plugins {
    id 'visual-studio'
}

Finally, you can generate and open your solution with the following command:

  • ./gradlew openVisualStudio will generate IDE files for VS2017 (C++) and open Visual Studio.

Please see the gradle guide on building native software for help: https://docs.gradle.org/current/userguide/native_software.html#native_binaries:visual_studio

Upgrading

To upgrade your Gradle project (and GradleRio plugin) from one year to the next follow the Importing a Gradle Project instructions in the WPILib Documentation.

For mid-season updates to GradleRio, edit build.gradle and replace the version in the plugin line (only change the GradleRIO line):

plugins {
    // ... other plugins ...
    id "edu.wpi.first.GradleRIO" version "REPLACE ME WITH THE LATEST VERSION"
}

The latest version can be obtained from here: https://plugins.gradle.org/plugin/edu.wpi.first.GradleRIO

Deploying alternate JRE

For 2023, JRE 17 is deployed. To use JRE 11 from previous years, do the following:

  1. Add wpi.jreArtifactLocation = 'edu.wpi.first.jdk:roborio-2021:11.0.9u11-1' to build.gradle
  2. Set gcType = 'CMS' in the java deploy block to use the CMS garbage collector

More Repositories

1

allwpilib

Official Repository of WPILibJ and WPILibC
C++
1,046
star
2

frc-docs

Official FRC Documentation powered by Read the Docs
JavaScript
144
star
3

vscode-wpilib

Visual Studio Code WPILib extensions
TypeScript
111
star
4

shuffleboard

A modern dashboard for FRC
Java
79
star
5

sphinxext-opengraph

Sphinx extension to generate unique OpenGraph metadata
Python
74
star
6

PathWeaver

Desktop application for generating motion paths
Java
64
star
7

frc-characterization

Tools to help FRC teams measure the physical parameters of their robot
Python
51
star
8

ntcore

NetworkTables Core Library (ARCHIVED, merged into allwpilib)
C++
39
star
9

RobotBuilder

Generate C++ or Java FRC programs
Java
36
star
10

sphinxext-rediraffe

Sphinx extension to redirect files
Python
32
star
11

2024Beta

Repository for Beta Testing of 2024 Software
32
star
12

sysid

System identification for robot mechanisms
C++
28
star
13

cscore

Camera access and streaming library (ARCHIVED, merged into allwpilib)
C++
24
star
14

SmartDashboard

Java
23
star
15

VisionBuildSamples

ARCHIVED - Samples for building Vision code for desktop and coprocessors
Java
18
star
16

EclipsePlugins

Java
14
star
17

Axon

TypeScript
14
star
18

sphinxext-remoteliteralinclude

Extends literalinclude to include URLs
Python
13
star
19

DetectCoral

Object detection for the FIRST Robotics Competition
Python
13
star
20

gradle-jni

Gradle plugin for ease of creating JNI libraries.
Java
13
star
21

wpilib-ws-robot-romi

TypeScript
10
star
22

sphinxext-pwa

Sphinx extension to make a PWA.
Python
9
star
23

vendor-template

C++
9
star
24

WPILibInstaller-Avalonia

C++
8
star
25

OutlineViewer

Java
8
star
26

Control-System-Vectors

Collection of community contributed vectors of the FRC Control System
7
star
27

wpiutil

WPI Utility Library
C++
7
star
28

docker-images

Docker images for building WPILib
Makefile
7
star
29

xrp-wpilib-firmware

C++
7
star
30

sphinxext-photofinish

Sphinx extension that adds responsive images to documentation
Python
6
star
31

frc-docs-translations

Translation Repository for frc-docs
Python
6
star
32

opensdk

Shell
6
star
33

thirdparty-opencv

OpenCV Maven packaging for FRC
C++
6
star
34

toolchain-builder

RoboRio Compiler < 2020 (See https://github.com/wpilibsuite/roborio-toolchain for 2020+)
Shell
5
star
35

design-docs

Design documents for proposed additions and changes to the wpilibsuite projects
5
star
36

NetworkTablesClients

NT Client implementations for multiple languages
C#
5
star
37

styleguide

Style guides for wpilibsuite projects
Python
5
star
38

ni-libraries

Houses the NI Libraries for WPILib building
C++
5
star
39

sphinxext-toptranslators

Grabs top translation contributors from PO files
Python
4
star
40

WPILibInstaller

The WPILib Offline Installer
C#
4
star
41

ohnoyoudidnt

Sphinx linter for frc-docs
Python
4
star
42

raspbian-toolchain

Toolchain builder for raspbian
Shell
4
star
43

xcode-notarize

Xcode Notarize
JavaScript
4
star
44

java-installer

Creates and installs an embedded JRE on the RoboRIO
Java
4
star
45

roborio-toolchain

GCC cross-compiler toolchain for roboRIO
Shell
4
star
46

native-utils

Gradle utility plugin for compiling native libraries
Java
4
star
47

vendor-json-repo

WPILib Vendor JSON Repository (WIP)
Python
4
star
48

robotbuilder-2

TypeScript
3
star
49

dev-ops

WPILib Suite Dev-Ops Documentation
3
star
50

homebrew-wpilib

This repository contains a collection of Homebrew (aka, Brew) "formulae" for WPILib.
Ruby
3
star
51

nivision

Not supported in 2018
Java
3
star
52

node-wpilib-ws

WebSocket server for interfacing with non-FRC hardware
TypeScript
3
star
53

sphinxext-presentations

Sphinx extension to present documentation
TypeScript
2
star
54

wpilib-version-plugin

Gradle plugin for determing what repository to pull and push dependencies to, and what version a part should be
Java
2
star
55

supervisely

Python
2
star
56

zulu-jre-ipk

Azul Zulu JRE ipk package builder
Makefile
2
star
57

wpimath

Math library (includes units and Eigen)
C++
2
star
58

riolog

Standalone version of Eclipse riolog
Java
2
star
59

roboRIOVisionExamples

Roborio Vision Examples
Java
2
star
60

sphinxext-delta

Sphinx extension for previewing changed github articles
Python
2
star
61

thirdparty-googletest

googletest gradle build for maven packaging
2
star
62

build-tools

Tools used by the Jenkins instance
2
star
63

branding

Branding standards for WPILib
Python
2
star
64

thirdparty-apriltag

Third-party build of apriltag
2
star
65

gradle-cpp-vscode

Gradle Plugin for generating a JSON representation of model based native builds
Java
2
star
66

sfxlib

SFX dashboard data library
Java
1
star
67

sfx

SFX dashboard UI
Ruby
1
star
68

sfxmeta

SFX dashboard annotations
Java
1
star
69

CANJaguar

Libraries for CANJaguar - Removed for the 2018 season
C++
1
star
70

frc-openjfx-windows

1
star
71

apple-signing-test

C++
1
star
72

desktop-common

Common library for WPILib JavaFX desktop applications
Java
1
star
73

wpilib-ws-robot

Base library for a WPILib WebSocket robot (Client/Server implementations)
TypeScript
1
star
74

sfx-livewindow

SFX LiveWindow plugin
Java
1
star
75

sphinxext-linkcheckdiff

Sphinx extension to run diff-only linkchecks.
Python
1
star
76

roborio-ant-tasks

Ant tasks for roboRIO
Java
1
star
77

frc-openjdk-roborio

OpenJDK builds for FRC RoboRIO
Shell
1
star
78

doxygen-mirror

Shell
1
star
79

StandaloneAppSamples

App Samples for running apps standalone
Java
1
star
80

wpilib-repositories-plugin

Gradle plugin for easy configuration of the wpilib repository scheme
Groovy
1
star
81

thirdparty-fonts

Fonts for imgui applications
Shell
1
star
82

deploy-utils

About Additions to the model-based DSL for deploying Java and Native projects to remote targets
Java
1
star