Skip to main content

How-To: Setup and use PARTsLib

Explanation

⚠️ Warning
This page only contains technical information.
Last updated: April 2nd, 2026
This guide explains how to setup and include PARTsLib into your robot project. There are two ways to add PARTsLib into your robot project.

Requirements

The library requrires the following vendor dependincies to be installed.

  • WPILib-New-Commands
  • PathplannerLib
  • CTRE-Phoenix (v6)

Method A - Git

This method involves adding PARTsLib as a submodule in your robot project.
The main advantage to adding the library as a submodule is getting the latest updates.
Experimental library versions are available for testing.

🔎 Note
This rquires your robot project to be in a git repository.

Install Steps

Adding the library as a submodule.

  1. In your terminal, navigate to your project folder.
  2. Add the repository as a submodule.
    git submodule add PARTsLib https://github.com/3492PARTs/PARTsLib.git
  3. Initialize and update the submodule.
    git submodule update --init -r

Adding the library into the gradle project.

  1. In settings.gradle add thr following to the bottom of the file on a new line.
    include("PARTsLib")
  2. Navigate to build.gradle. Look for the dependencides and add the following line to the bottom.
    dependencies {
        // All other stuff in here.
        implementation(project(':PARTsLib'))
    }
  3. Save and build the project.

Method B - Jitpack.io

This method is more stable because a stable release of the library is used.
Adding the library this way is easier due to it just being a dependency.
A git repository is not required.

Install Steps

Adding the library as a dependency.

  1. In your terminal, navigate to your project folder.
  2. Navigate to build.gradle and add the following lines under the java segmemt. For the version, put any release listed on the Jitpack site. E.g. "v2026.1.0".
    java {
    // ...
    }

    repositories {
    mavenCentral()
    maven { url "https://jitpack.io" }
    }

    def PARTSLIB_VERSION = "[VERSION_HERE]"
  3. In the same file, scroll down to the dependencies section and add the following line to the bottom of that segment.
    dependencies {
    // Other things.

    implementation("com.github.3492PARTs:PARTsLib:${PARTSLIB_VERSION}")
    }