Thank you for your interest in contributing to AdvantageKit! This project is maintained by Littleton Robotics and the community. To ensure that AdvantageKit remains reliable for all teams, we have established a set of guidelines for contributions.
Please remember to behave with Gracious Professionalism in all interactions. Any questions or concerns can be directed to software@team6328.org.
- Reliability is Paramount: AdvantageKit is infrastructure. Changes must not break existing logging capabilities or introduce non-determinism into the replay cycle.
- Backward Compatibility: Where possible, breaking changes should follow a one year deprecation cycle to minimize friction for users.
- Documentation: Most code changes require corresponding updates to the documentation. Please ask us for help if you're not sure where to start.
- Broad Applicability: Features should be useful to a wide range of teams. New logging formats should be broadly supported and useful to many users.
- Bug Reports & Fixes: We welcome fixes for bugs found during or after the season. Please submit a GitHub issue first to track the bug.
- Feature Improvements: Improvements to the AdvantageKit API are welcome, but feature changes will generally not be merged until after the competition season. For large changes, please open a GitHub issue or contact us at software@team6328.org before starting work.
- Java Version: Ensure you have JDK 17 or newer installed.
- Clone the Repository:
git clone https://github.com/Mechanical-Advantage/AdvantageKit.git
cd AdvantageKit- Install the roboRIO Toolchain: (if needed)
./gradlew :akit:installRoboRioToolchain- Build the Project:
./gradlew :akit:buildTesting your changes usually requires building a local copy of the library and consuming it in a separate robot project (e.g., a starter project or your team's code).
To test your changes, you must publish the library to your local Maven repository. You can use the publishToMavenLocal Gradle task for this.
- Make your changes in the AdvantageKit repository.
- Publish to Maven Local: Run the following command in the root of the AdvantageKit repo:
./gradlew :akit:publishToMavenLocalThis compiles the code and places the artifacts (JARs and native zips) into your local user's .m2 directory (e.g., ~/.m2/repository/).
To use your locally built version of AdvantageKit in a robot project:
- Open your robot project.
- Locate the
vendordeps/AdvantageKit.jsonfile. - Update the Version: Change the version field to
"dev".
{
"fileName": "AdvantageKit.json",
"name": "AdvantageKit",
"version": "dev",
"uuid": "...",
...
}- Add the Maven Local repository: Add the local repository to the
build.gradlefile.
repositories {
mavenLocal()
}- Test: Deploy your robot code or run it in simulation. It will now be using the modified AdvantageKit library from your machine.
Important: Do not commit the "version": "dev" change to your robot project's version control if you intend to share it with others who do not have your local build.
Template projects are stored in the template_projects folder and can be built using a Bash script:
cd template_projects
./generate_projects.shGenerated projects are stored in the template_projects/generated folder and can be opened separately in VSCode for editing with full IntelliSense. Note that the ./generate_projects.sh script will overwrite any changes in the generated projects. Copy any changes to the template_projects/sources folder first.
You can also run the following script to verify that all generated projects can build successfully:
cd template_projects
./build_generated_projects.shDocumentation is stored in the docs folder and is built using Docusaurus.
- Node.js Installation: Ensure that Node.js 20 or later is installed.
- Change Folders: Navigate to the
docsfolder. - Install Dependencies:
npm install- Launch Development Server:
npm start- Build the Full Documentation:
npm run buildAdvantageKit enforces code formatting using Spotless.
To check if your code meets the style guidelines without modifying files:
./gradlew spotlessCheckTo automatically fix formatting issues:
./gradlew spotlessApplyIt is highly recommended to run ./gradlew spotlessApply before every commit to ensure your PR checks pass.
- Fork the repository and push your changes to a branch on your fork.
- Open a Pull Request (PR) against the
mainbranch of AdvantageKit. - Description: Clearly explain what you changed, why you changed it, and how you tested it.
- Documentation: If your change adds a new feature or alters behavior, please indicate if documentation updates are needed.
Your code will be reviewed by maintainers, and we may request changes to ensure code style consistency, API stability, or performance. AdvantageKit is developed by volunteers, so code reviews may be delayed (especially during the competition season). Please reach out to us via GitHub or email (software@team6328.org) if you have any questions or concerns about an open pull request.
By contributing to AdvantageKit, you agree that your code will be distributed under the project's BSD license (link). You should not contribute code that you do not have permission to relicense in this manner, such as code that is licensed under GPL that you do not have permission to relicense.