- Make sure IntelliJ is closed if it's open, then clone the project.
- Double click
setup_intellij.bat
. This will generate files all the IntelliJ specific files for the project. Alternatively, you can run./gradlew idea
in the project directory on either Powershell or a Linux shell. - Double click the
PowerUp.ipr
file which was just generated. IntelliJ should open the project. - Once IntelliJ is opened, a tooltip should open in the bottom right which says
Unlinked gradle project?
. ClickImport gradle project
. - Make sure
Use default gradle wrapper
is selected, then clickFinish
. - From the menu bar, click View > Tool Windows > Project. (Or press Alt+1).
Now your project should be set up. It's recommended you add some build tasks to IntelliJ to make building easy:
- From the menu bar, click Run > Edit Configurations.
From here we'll repeat a couple steps to add all the build tasks we'd reasonably need:
- Click + > Gradle.
- Fill in Name:
Build
. - Fill in Gradle project by clicking on the folder icon and selecting
PowerUp
. - Fill in Tasks:
build
.
That's all you need to add a build task. You should repeat steps 8-11 for the following build tasks as well (replacing name and tasks with the appropriate name):
- Deploy (deploy)
- Smart Dashboard (smartDashboard)
- Offline deploy (build deploy --offline)
Once you've finished, these should all appear in the run drop down menu on the toolbar.
- Make sure Eclipse is closed if it's not already, then clone the project. This does not have to be in your Eclipse workspace.
- Double click
setup_eclipse.bat
. This will generate files all the Eclipse specific files for the project. Alternatively, you can run./gradlew eclipse
in the project directory on either Powershell or a Linux shell. - Open Eclipse.
- From the menu bar, click File > Import.
- From the drop-down menu, expand Gradle and click
Existing Gradle Projects
. - Click through the intro screen.
- For the project root directory, navigate to where you cloned the project. Then click Finish.
Now your project should be set up. It's recommended you add some build tasks to Eclipse to make building easy. (Eclipse saves build tasks between projects so you can skip these steps if you've done it before):
- From the menu bar, click Run > Run Configurations.
From here we'll repeat a couple steps to add all the build tasks we'd reasonably need:
- Click
Gradle Project
in the menu, and then click on the new icon (on the top left of the dialog). - Fill in Name:
Build
- Fill in Gradle Tasks:
build
- Fill in Working Directory by clicking on Workspace and selecting PowerUp.
- Click 'Apply'.
That's all you need to add a build task. You should repeat steps 9-13 for the following build tasks as well (replacing name and tasks with the appropriate name):
- Deploy (deploy)
- Smart Dashboard (smartDashboard)
- Offline Deploy (build deploy --offline)
To get these to show in Eclipse's run dropdown, you either need to have ran the configuration from the set up menu or you need to specify them as a "favorite". Here's the steps to do this:
- Head to run configurations.
- Click on the task you want to pin.
- Go over to the
Common
tab - Tick the box in
Display in favorites menu
next toRun
.
Here's a collection of some useful GradleRIO commands and tips for development. Reading the full documentation here is recommended.
-
clean
will clean your code. -
build
will build your code. -
deploy
will build and deploy your code. -
shuffleboard
will launch Shuffleboard.