SERT's base robot code for Gradle and Kotlin.
There are two ways to go about the yearly repository setup. You can either set it up manually, or make things easy on yourself and do it the automatic way.
$ git clone --depth=1 https://github.com/SouthEugeneRoboticsTeam/Robot-Base.git GameName-Year
$ rm -rf !$/.git
$ git init
$ git remote add origin https://github.com/SouthEugeneRoboticsTeam/GameName-Year.git
$ git add .
$ git commit -m "Initial commit"
$ git push origin master
- Package name and actual package
- GradleRIO dependency
First, install the robot-maker
CLI.
Then, use the CLI to clone the repository and update packages and Gradle as needed!
$ robot-maker ./PowerUp-2018
Boom! You're done!
Unfortunately, GradleRIO made a bad decision to use dynamic versioning which is a feature Gradle has
that will find the latest version of a dependency for you. This sounds good, but is very bad for
several reasons: lack of build reproducibility, stuff could change under you without notice, Gradle
makes a network call to check if you have the latest version of a dependency on every build, etc.
The last example is the main issue because it prevents building robot code unless you have an
internet connection (which the robot doesn't). To get around this issue, you have to push code to
the robot with the --offline
flag.
- To get everything downloaded and setup, run
./gradlew build
once while online - When pushing code to the robot, use
./gradlew deploy --offline