Skip to main content

With Kotlin

Install CFLib using the Kotlin syntax

Step 1: Add the repositories.

In your root build.gradle.kts file (your-project/build.gradle.kts), find the allprojects/repositories block. It should look like this:

allprojects {
repositories {
mavenCentral()
google()
}
}

Add this line at the end of the block:

maven("https://jitpack.io/")
maven("https://maven.brott.dev/")

It should now look like this:

allprojects {
repositories {
mavenCentral()
google()

maven("https://jitpack.io/")
maven("https://maven.brott.dev/")
}
}
Step 2: Add the dependencies.
In your `TeamCode/build.gradle.kts` file, find the `dependencies` block. It should look something like this:
caution

Make sure you are in the project build.gradle.kts, not the root build.gradle.kts

dependencies {
implementation(project(":FtcRobotController"))
annotationProcessor(files("lib/OpModeAnnotationProcessor.jar"))
}

Add these lines at the end of the block

implementation("com.github.AtomicRobotics3805:CFLib:0.2.0")
implementation("org.apache.commons:commons-math3:3.6.1")
implementation("com.acmerobotics.roadrunner:core:0.5.5")
implementation("com.github.NoahBres:MeepMeep:2.0.1")

So it looks like this

dependencies {
implementation(project(":FtcRobotController"))
annotationProcessor(files("lib/OpModeAnnotationProcessor.jar"))

implementation("com.github.AtomicRobotics3805:CFLib:0.2.0")
implementation("org.apache.commons:commons-math3:3.6.1")
implementation("com.acmerobotics.roadrunner:core:0.5.5")
implementation("com.github.NoahBres:MeepMeep:2.0.1")
}

Finally, sync Gradle.