Installation
How to import SolversLib into your Android Studio FTC Project
Option 1: Installing from FTCLib
This requires you to have some version of FTCLib already installed. SolversLib allows you to easily migrate from FTCLib to SolversLib while keeping all of your code.
build.gradle
The first thing you need to change from FTCLib is the dependency in build.gradle
dependencies {
// implementation "org.ftclib.ftclib:core:2.1.1" remove FTCLib core
// FTCLib's vision is no longer supported in SolversLib
implementation "org.solverslib:core:SNAPSHOT-5a81a6b" // coreOr, if you are using pedroPathing, change to this dependency block
dependencies {
// implementation "org.ftclib.ftclib:core:2.1.1" remove FTCLib core
// FTCLib's vision is no longer supported in SolversLib
implementation "org.solverslib:core:SNAPSHOT-5a81a6b" // core
implementation "org.solverslib:pedroPathing:SNAPSHOT-5a81a6b" // pedroPathing
}Important: Different versions of SolversLib correlate with different versions of Pedro Pathing.
SolversLib 0.3.3+ is for Pedro Pathing 2.0.0 and higher SolversLib 0.3.2 is for Pedro Pathing 1.0.9 SolversLib 0.3.1 is for Pedro Pathing 1.0.8
The latest version numbers (as well as a list of all version numbers) are available at:
Latest
coreversion: https://repo.dairy.foundation/#/releases/org/solverslib/coreLatest
pedroPathingversion: https://repo.dairy.foundation/#/releases/org/solverslib/pedroPathing
Warning: If you choose to use the Pedro Pathing module, you still need to install Pedro Pathing 2.0.0+ in order to use it.
Please note that you should not and cannot have both FTCLib and SolversLib installed at the same time.
Changing Imports (Only if Migrating from FTCLib)
Because the package names will be different, you can either manually replace all instances of com.arcrobotics.ftclib with com.seattlesolvers.solverslib , or use a command in a terminal to replace them all at once for you. Please make sure you either open a terminal into your Android Studio project or use the built-in Android Studio terminal to run the commands below.
FTCLib Imports to SolversLib Imports (MacOS/Linux):
find . -type f -name "*.java" -exec sed -i '' 's/com.arcrobotics.ftclib/com.seattlesolvers.solverslib/g' {} +SolversLib Imports to FTCLib Imports (MacOS/Linux):
find . -type f -name "*.java" -exec sed -i '' 's/com.seattlesolvers.solverslib/com.arcrobotics.ftclib/g' {} +FTCLib Imports to SolversLib Imports (Windows):
Get-ChildItem -Recurse -Filter *.java | ForEach-Object {
(Get-Content $_.FullName) -replace 'com.arcrobotics.ftclib', 'com.seattlesolvers.solverslib' |
Set-Content $_.FullName
}SolversLib Imports to FTCLib Imports (Windows):
Get-ChildItem -Recurse -Filter *.java | ForEach-Object {
(Get-Content $_.FullName) -replace 'com.seattlesolvers.solverslib', 'com.arcrobotics.ftclib' |
Set-Content $_.FullName
}Repositories (required)
Finally, follow the steps in the Repositories section.
Option 2: Installing from SolversLib Quickstart
An alternative option is to simply use the SolversLib Quickstart. Similar to the FTCLib Quickstart, SolversLib has a Quickstart with this library fully set up. You can view it at https://github.com/FTC-23511/SolversLib-Quickstart. You can either fork or clone this repository as needed to use it.
In addition, the Quickstart also has the Pedro Pathing library installed and added along with the SolversLib pedroPathing dependency, meaning that it is hassle-free. If you don't want the Pedro Pathing part, you can simply delete the relevant files and dependencies.
Option 3: Installing from Scratch
build.common.gradle
First, you need to add the mavenCentral library repository to your build.gradle file at the project root:
repositories {
mavenCentral()
}Next, minSdkVersion to 24 and multiDexEnabled to true:
defaultConfig {
applicationId 'com.qualcomm.ftcrobotcontroller'
minSdkVersion 24
targetSdkVersion 28
multiDexEnabled trueNext, change JavaVersion to 8 :
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}build.gradle
Finally, you need to add the SolversLib dependencies in build.gradle
dependencies {
// FTCLib's vision is no longer supported in SolversLib
implementation "org.solverslib:core:SNAPSHOT-7962e3e" // coreOr, if you are using pedroPathing, change to this dependency block
dependencies {
// FTCLib's vision is no longer supported in SolversLib
implementation "org.solverslib:core:SNAPSHOT-7962e3e" // core
implementation "org.solverslib:pedroPathing:SNAPSHOT-7962e3e" // pedroPathing
}Important: Different versions of SolversLib correlate with different versions of Pedro Pathing.
SolversLib 0.3.3+ is for Pedro Pathing 2.0.0 and higher SolversLib 0.3.2 is for Pedro Pathing 1.0.9 SolversLib 0.3.1 is for Pedro Pathing 1.0.8
The latest version numbers (as well as a list of all version numbers) are available at:
Latest
coreversion: https://repo.dairy.foundation/#/releases/org/solverslib/coreLatest
pedroPathingversion: https://repo.dairy.foundation/#/releases/org/solverslib/pedroPathing
Warning: If you choose to use the Pedro Pathing module, you still need to install Pedro Pathing 2.0.0+ in order to use it.
Please note that you should not and cannot have both FTCLib and SolversLib installed at the same time.
Repositories (required)
Finally, follow the steps in the Repositories section.
Snapshot Versions
SolversLib is graciously hosted on the Dairy Foundation (thanks to Oscar!), and has release versions and snapshots versions.
Release versions:
Are official, verified versions of SolversLibs
Less likelier to have problems/bugs
Are in the form:
implementation "org.solverslib:core:x.y.z"(where x, y, and z are version numbers).
Snapshots versions:
Are unofficial, and effectively beta versions with newere features and additions
More likelier to have problems/bugs
Are in the form:
implementation "org.solverslib:pedroPathing:SNAPSHOT-abc1234"(7 random letters & numbers).
The latest versions of both can be found below:
Latest
coresnapshot version: https://repo.dairy.foundation/#/snapshots/org/solverslib/coreLatest
pedroPathingsnapshot version: https://repo.dairy.foundation/#/snapshots/org/solverslib/pedroPathing
Repositories:
Look at the section below. Make sure to follow the snapshot versions part.
Repositories (required)
In your repositories block, add the following code. You may have other content here, especially if you have the Pedro Pathing library installed. If you do not have a repositories block, you can add it above your dependencies block.
repositories {
maven {
url "https://repo.dairy.foundation/releases"
}
}Only for Snapshot/Beta Versions (e.g., 0.3.4 Beta)
You also need to add the maven for snapshots in your repositories block in addition to the releases one. Again, if you do not have a repositories block, you can add it above your dependencies block.
A Snapshot version (e.g., SNAPSHOT-7cdcc66) is a beta version.
repositories {
maven {
url "https://repo.dairy.foundation/releases"
}
maven {
url "https://repo.dairy.foundation/snapshots"
}
}Sync Gradle and Finished!

Last updated