Activity 1.3: Open & Build the Project
🎯 Goal
By the end of this unit you will have:
- Opened the team’s Drive2026FBI project in WPILib VS Code
- Located the key files you learned about in Lesson 1.1
- Run a Gradle build and confirmed it completes without errors
This is your first hands-on interaction with the real codebase. No code changes — just open, explore, and build.
Step 1: Open the Project in WPILib VS Code
WPILib ships its own version of VS Code with all the FRC extensions pre-installed. Always use this version for robot code — not regular VS Code.
- Launch WPILib VS Code from your Start Menu (Windows) or Applications folder (macOS)
- Go to File → Open Folder…
- Navigate to where you cloned the robot project and select the
{robotConfig.repoName}/folder - Click Open (or Select Folder on Windows)
After opening, VS Code may show a notification asking to import the Gradle project. Click Yes or Import if prompted. This lets the Java extension understand the project structure.
Step 2: Verify the Project Structure
Use the VS Code file explorer (the sidebar on the left) to confirm you can see the project files. Expand the folders and check that the structure matches what you learned in Lesson 1.1:
Drive2026FBI/├── src/│ └── main/│ ├── java/frc/robot/ ← Robot code lives here│ └── deploy/ ← PathPlanner paths and configs├── vendordeps/ ← Third-party library configs├── build.gradle ← Gradle build script├── gradlew / gradlew.bat ← Gradle wrapper scripts└── ...Now navigate to the robot code folder. In the file explorer, expand:
src → main → java → frc → robot
You should see the core files you learned about:
{robotConfig.coreFiles.main}— program entry point{robotConfig.coreFiles.robot}— lifecycle manager{robotConfig.coreFiles.robotContainer}— wires subsystems to controls{robotConfig.coreFiles.constants}— configuration values
And the subfolders:
subsystems/— one file per physical mechanism (5 subsystems)commands/— standalone command classesgenerated/— auto-generated swerve config (don’t edit!)
Step 3: Open a Core File
Let’s make sure VS Code can actually read the Java files. Click on
You should see Java code with syntax highlighting (keywords in different colors). If the file opens as plain text with no colors, the Java extension may not be loaded yet — give it a minute and try again.
Don’t worry about understanding every line right now. You covered the lifecycle in Lesson 1.2. The point here is just to confirm the IDE is working.
Step 4: Run a Gradle Build
This is the big moment — let’s compile the entire project and make sure everything works.
Option A: Using the WPILib Command Palette (Recommended)
- Press Ctrl+Shift+P (Windows/Linux) or Cmd+Shift+P (macOS) to open the Command Palette
- Type WPILib: Build Robot Code
- Select it from the dropdown and press Enter
A terminal panel will open at the bottom of VS Code showing the build progress.
Option B: Using the Terminal Directly
- Open the VS Code terminal: Terminal → New Terminal (or press Ctrl+`)
- Make sure you’re in the
{robotConfig.repoName}/directory - Run the build command:
./gradlew buildOn Windows, use:
gradlew.bat buildStep 5: Read the Build Output
Watch the terminal output as the build runs. You’ll see Gradle downloading dependencies, compiling Java files, and running checks.
What Success Looks Like
A successful build ends with:
BUILD SUCCESSFUL in XsThe X is the number of seconds it took. If you see this, congratulations — the project compiles and you’re ready to go!
What Failure Looks Like
If something goes wrong, you’ll see:
BUILD FAILEDalong with error messages above it. Common first-build issues:
| Problem | Fix |
|---|---|
| ”Could not resolve dependencies” | Check your internet connection. Gradle needs to download libraries. |
| ”JAVA_HOME is not set” | Make sure you’re using WPILib VS Code, not regular VS Code. The WPILib version sets JAVA_HOME automatically. |
| ”Could not determine java version” | Reinstall the WPILib suite — it includes the correct JDK (Java 17). |
| Compilation errors in Java files | This shouldn’t happen on a fresh clone. Try ./gradlew clean build to start fresh. If errors persist, ask a mentor. |
A successful build ends with BUILD SUCCESSFUL in Xs (where X is the time in seconds).
The build output appears in the Terminal panel at the bottom of VS Code. If you used the WPILib Command Palette, it opened a terminal automatically. If you ran the command manually, you typed it in the integrated terminal.
If your build failed, check the troubleshooting table above. The most common issue on a first build is a missing internet connection (Gradle needs to download dependencies). If you’re stuck, ask a teammate or mentor for help.
What’s Next?
You’ve confirmed that the project opens and builds cleanly. This is your baseline — from now on, whenever you make changes in later units, you’ll run this same build to verify nothing broke.
Next up in Unit 2, you’ll start reading the actual robot code. Lesson 2.1: Subsystems walks through the subsystem classes that control the robot’s physical mechanisms.