Installation
Build the 0.2.0 preview to use the simpler API and shared hardware map.
Choose the correct version
These examples target CubicLib 0.2.0, currently a local development build. The public Maven release is still 0.1.0 and does not contain GlobalObjects or the new convenience methods. Do not use 0.1.0 with the examples on these pages.
1. Build the local Maven repository
In the updated CubicLib source checkout, use Android Studio’s JDK and Android SDK platform 34. Set JAVA_HOME and ANDROID_HOME (or sdk.dir in local.properties), then run:
./gradlew :cubic-core:test :cubic-ftc:assembleRelease publishAllPublicationsToDistributionRepository2. Add the local repository
In your FTC project’s existing repositories block, add the local Maven folder. This example assumes CubicLib is beside the FTC project; adjust the path if necessary. Keep google() and mavenCentral().
maven { url = uri("${rootDir}/../CubicLib/build/maven") }3. Add the dependency
Add this to TeamCode/build.gradle and sync Gradle. CubicLib uses FTC SDK 12.0.0. Maven resolves cubic-core, Gson and NanoHTTPD alongside the Android library.
dependencies {
implementation 'dev.cubiclib:cubic-ftc:0.2.0'
}Public Maven hosting
After 0.2.0 has been published, the local repository can be replaced with the public URL below. Until then, keep the local repository to resolve 0.2.0.
maven { url = uri("https://cubic25473.github.io/CubicLib/maven/") }4. Deploy and connect
Build and deploy the Robot Controller app. Connect to the robot Wi-Fi and open http://<robot-ip>:8087/. A Control Hub commonly uses http://192.168.43.1:8087/; use the robot’s actual address.
Open Robot setup to configure localization before Init. The dashboard starts via the FTC @OnCreate hook, with CubicOpMode.init() as a fallback. These public docs are separate from the dashboard hosted by your robot.