Thank you for considering contributing to the Shadow Gradle plugin! This document provides guidelines and information to help you get started.
Shadow uses Spotless to maintain consistent code formatting.
- Check code style:
./gradlew spotlessCheck - Format code:
./gradlew spotlessFormat
Please ensure your code is properly formatted before submitting a pull request.
Shadow has multiple test suites to ensure code quality:
- Unit tests:
./gradlew test - Documentation tests:
./gradlew documentTest- Tests code snippets in the./docsdirectory - Functional/Integration tests:
./gradlew functionalTest
Make sure all tests pass before submitting your changes.
Shadow uses Kotlin's binary compatibility validator to track public API changes.
- Check API dumps:
./gradlew checkKotlinAbi - Update API dumps:
./gradlew updateKotlinAbi
If you add or modify public APIs, you'll need to update the API dump files.
Shadow uses Android Lint to catch potential issues.
- Run lint checks:
./gradlew lint - Update lint baseline:
./gradlew updateLintBaseline
When fixing bugs or issues:
- Ensure all existing tests pass
- Add regression tests that verify the fix for the reported issue
- Run the full test suite to ensure no unintended side effects
- Update documentation if the fix changes behavior
When adding new features or public APIs:
- Ensure proper visibility modifiers are used
- All public APIs must be documented with KDoc comments
- Run
./gradlew updateKotlinAbito update the API dump files - Add appropriate tests for the new functionality
- Update the documentation in the
./docsdirectory if applicable
- Run
./gradlew spotlessFormatto format your code - Run
./gradlew spotlessCheckto verify formatting - Run all test suites:
./gradlew test documentTest functionalTest - Run
./gradlew checkKotlinAbito ensure API compatibility - Run
./gradlew lintto check for potential issues - Optionally, run
./gradlew buildto run compilation, tests, and standard verification tasks configured for the project - Ensure your commit messages are clear and descriptive
- Update the
Unreleasedsection in CHANGELOG if applicable