mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
This adds gradle support for building wpilibj and wpilibc. At this point, both of these libraries should be fully ready to go. Gradle should give us a number of improvements, including less dependencies for getting building up and running, and MUCH faster build times. I'm noticing significantly faster build times already compared to Maven, with neither system building the plugins. The changes here should be pretty straight forward. The basic command for gradle is './gradlew'. This is the gradle wrapper, and it will find and download the correct gradle executable for your system. There is no need to install anything yourself. To see every task available, run './gradlew tasks'. The important tasks for us are listed under the WPILib header when the tasks command is run. To generate unit test binaries, the fRCUserProgramExecutable command will create the C++ tester, and the wpilibjIntegrationTestJar command will create the Java tester. The Jenkins deploy scripts have been modified to know the difference between maven generated and gradle generated jars with an environment variable. Creating the eclipse plugins still requires Maven, but gradle will handle calling it correctly and generating the proper dependencies for it. Create the plugins by calling ./gradlew eclipsePlugins. Jenkins can now be modified to support the new build system. Unit tests are run with ./gradlew test. Generating the integration tests uses the above two commands, and then process proceeds exactly as it did before. For publishing documentation, a new task has been created, ./gradlew publishDocs, which handles putting the documentation where Jenkins expects for publishing. Change-Id: I9a260d391984f98ef9170993efe933e4026161dc