NOTE: Using the VMX-PI WPI Extension is the recommended method for modifying the VSCode build.gradle project file to for VMX-pi. However if manual editing is desired, the following directions below demonstrate how to modify build.gradle for VMX-pi.
After first creating your VSCode project (e.g., using the official “Creating a Robot Program” documentation), several VMX-pi specific configuration changes are required to each VSCode project’s build.gradle file:
- The VMX-specific GradleRIO plugin which acquires, builds and deploys software for your VMX-pi.
- The VMX-pi deployment target specifier.
- The target raspbian platform used by Raspberry Pi.
NOTE: WPI Lib 2020 uses a different build.gradle format than the older 2019 version; 2019 build.gradle files cannot be used with WPI Lib 2020. Therefore, if using a 2019 build.gradle file you must first import that project as a 2020 project before making the modifications described below.
Current GradleRIO Plugin Version
Whenever new releases of VMX-pi WPI Library Software occur, the Kauai Labs FIRST GradleRIO plugin version will be updated. The latest version is always indicated on the Kauai Labs FIRST GradleRIO plugin page.
NOTE: Whenever updating the GradleRIO Plugin Version, be sure to rebuild your project; without rebuilding, your project may still be referencing an older version of the GradleRIO Plugin.
Updating the build.gradle project file
The specific build.gradle configurations are slightly different for Java and C++, as shown below.