> For the complete documentation index, see [llms.txt](https://docs.raidrobotics.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.raidrobotics.org/commands-v3-state-machine/getting-started/install-and-build.md).

# Install and build

The template is a standard WPILib Gradle project. If you can build any WPILib 2027 project, you can build this one.

## What you need

| Tool   | Version        | Where it comes from                                                 |
| ------ | -------------- | ------------------------------------------------------------------- |
| WPILib | 2027 (alpha 8) | The WPILib installer. It also installs VS Code and the JDK.         |
| Java   | 25             | Comes with the WPILib 2027 installer. Don't install a separate one. |
| Git    | Any recent     | [git-scm.com](https://git-scm.com/) or GitHub Desktop               |

The vendor libraries (Commands v3, Phoenix 6 and LimelightLib) are already in the `vendordeps/` folder. Gradle downloads them on the first build, so that build needs internet.

## Get the code

```bash
git clone https://github.com/Team4469/Robot_FSM_Template-Commandv3.git
```

Open the folder in WPILib VS Code (**File › Open Folder**). VS Code picks up the Java settings from `.vscode/` on its own.

## Build

From the project folder:

```bash
./gradlew build
```

On Windows, use `gradlew.bat build`. In VS Code you can also use the WPILib menu (the **W** icon) › **Build Robot Code**.

A build compiles the code and runs the tests. If it ends with `BUILD SUCCESSFUL`, you're ready for the [simulator](https://docs.raidrobotics.org/commands-v3-state-machine/getting-started/simulator.md).

## Deploy to a robot

With the laptop connected to the robot:

```bash
./gradlew deploy
```

The team number comes from `.wpilib/wpilib_preferences.json` (it's `4469`). Anything in `src/main/deploy/` is copied onto the robot controller too.

{% hint style="danger" %}
Every CAN ID, gear ratio, gain and position in the template is a placeholder. Read [Before the real robot](https://docs.raidrobotics.org/commands-v3-state-machine/how-to/before-the-real-robot.md) before you enable it on real hardware.
{% endhint %}

## If the build fails

### "invalid source release: 25"

Gradle found an older Java instead of the one WPILib installed. Tell Gradle where the WPILib JDK is by adding this line to `~/.gradle/gradle.properties` (create the file if it doesn't exist):

```properties
org.gradle.java.installations.paths=/Users/<you>/wpilib/2027_alpha7/jdk
```

Change the path to match your WPILib install folder. On Windows it's usually `C:\Users\Public\wpilib\2027_alpha7\jdk`.

### Vendor dependencies won't download

The first build needs internet to fetch WPILib and the vendor libraries. Once they're cached, offline builds work. If you're on a school network that blocks Maven, build once at home.

More problems and fixes are in [Troubleshooting](https://docs.raidrobotics.org/commands-v3-state-machine/reference/troubleshooting.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.raidrobotics.org/commands-v3-state-machine/getting-started/install-and-build.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
