Installation
Add three Maven repositories, then one dependency to your TeamCode module — CDALib and everything it needs come from there.
CDALib is distributed as an Android library (AAR) through
JitPack. It builds on the standard FTC
ftc_app / FtcRobotController project layout, so you add it the same way
you would any other Gradle dependency.
Requirements
| Component | Version |
|---|---|
| FTC SDK | 12.0.0 (2026–2027 season) |
| PedroPathing | 3.0.1 (pulled transitively via CDALib) |
Android minSdk | 24 |
Android compileSdk | 36 |
| JDK | 17 (only needed to build CDALib from source; AGP 8.13) |
Step 1 — Add the repositories
In your FTC project's settings.gradle, inside the
dependencyResolutionManagement block, declare all five repositories. Modern FTC
projects set RepositoriesMode.FAIL_ON_PROJECT_REPOS, so repositories must live here
(centrally) rather than in a module's build.gradle.
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
// CDALib is served from JitPack.
maven { url = 'https://jitpack.io' }
// Pedro Pathing (com.pedropathing:*) and Panels (com.bylazar:*) are published here.
maven { url = 'https://mymaven.bylazar.com/releases' }
// Dairy Foundation — serves dev.frozenmilk.sinister:Sloth, pulled by com.pedropathing:tuning.
maven { url = 'https://repo.dairy.foundation/releases' }
}
}
| Repository | Why it is needed |
|---|---|
google() | Android Gradle Plugin, AndroidX, and Google libraries. |
mavenCentral() | The FTC SDK artifacts and most common Java dependencies. |
JitPackhttps://jitpack.io | Serves CDALib itself — JitPack builds the library from its GitHub tag and publishes the AAR. |
bylazarhttps://mymaven.bylazar.com/releases | Serves PedroPathing (com.pedropathing:*) and the Panels dashboard (com.bylazar:*). |
Dairy Foundationhttps://repo.dairy.foundation/releases | Serves Sloth (dev.frozenmilk.sinister:Sloth), a transitive dependency of com.pedropathing:tuning (the AutoTune runtime) that is not on Maven Central. |
Step 2 — Add the dependency
In TeamCode/build.gradle, add CDALib to the dependencies block:
dependencies {
implementation project(':FtcRobotController')
implementation('com.github.CDAFM-Robotics:CDALib:v0.2.0@aar') {
transitive = true
}
}
Why @aar and transitive = true?
@aarpins the request to the artifact JitPack actually publishes. An Android library produces no plain.jar; without the classifier, JitPack's handling of the missing artifact is unreliable and can stall a sync until Gradle's socket timeout fires. Naming the AAR explicitly resolves it in milliseconds.transitive = trueis required because artifact-only notation (@aar) drops the library's own dependencies by default. With it enabled, PedroPathing, PhotonFTC, and Panels all arrive automatically through CDALib.
Note: You do not add PedroPathing or PhotonFTC yourself — they come
transitively via CDALib. The FTC SDK (
RobotCore, Hardware, and friends)
is provided by the Robot Controller app at runtime and is not bundled into your APK.Breaking change — v0.2.0: Version
0.2.0 is a breaking
release versus 0.1.0. It migrates to PedroPathing 3.0 (the old single
com.pedropathing:ftc artifact is now split into core + revhub),
and Subsystem now declares an abstract init_loop() that every
subsystem must implement. Existing subsystems written for 0.1.0 will not compile until
you add an init_loop() override. See Subsystems.