Thank you for considering contributing to Carbon Compose! Before you start, please take a moment to review these guidelines.
By participating in this project, you agree to abide by the Code of Conduct. Please be respectful to others and help create a positive environment.
If you find a bug, please report it by opening a new issue. When reporting a bug, please provide as much detail as possible:
- A clear and descriptive title.
- Steps to reproduce the issue.
- Expected and actual behavior.
- Relevant screenshots, if applicable.
- Information about your environment.
New ideas for new features or improvements are welcomed. To suggest an enhancement:
- Check if the feature is already requested or discussed by searching existing issues.
- If not, open a new issue with a detailed description of the enhancement, including:
- The motivation behind the enhancement.
- How it benefits the project.
- Any possible implementation ideas (encouraged).
This project follows the Trunk-Based Development model. The
main
branch is the production-ready and PRs should be submitted against the main
branch.
In its specificities, the project follows the
"release from trunk" strategy.
As feature flags are quite complex to implement in a library because code stays accessible to the
user, wip features are marked with @Experimental
annotation.
Pull Requests (PRs) are the best way to propose changes to the codebase. Here’s how to get started:
- Fork the repository and clone your fork to your local machine.
- Create a new branch for your changes.
-
Please name your branch with a sub-directory corresponding to what you are mainly working on:
git checkout -b <scope>/<changes-name>
. -
<scope>
can becomponent
,foundation
,cicd
,misc
,documentation
, etc. It can be anything as long as it remains relevant.For example, if you're correcting a bug in the Tag component and you also have to make changes in the catalog app, the main scope remains
component
so your branch could be namedcomponent/fix-tag-bug
.
-
- Make your changes and commit them with clear and descriptive messages (see Git Commit Messages below).
- Make sure your changes does not contain code smells. The project uses the Detekt plugin for static code analysis.
- If you've worked on the library, ensure you have updated the API signature by running
gradle apiDump
. - Push your changes to your fork and submit a PR against the
develop
branch. - Ensure that your PR:
- Links to any related issues.
- Passes all tests.
- Includes relevant documentation updates.
Your PR will be reviewed and provided with feedback. Please be responsive to comments and requests for changes.
To set up the development environment:
- Check your system with KDoctor.
- Install JDK 17 on your machine.
- Add
local.properties
file to the project root and set a path to Android SDK there.
- Use the present tense ("Add feature" not "Added feature").
- Use the imperative mood ("Move button" not "Moves button").
- Reference issues and pull requests when applicable.
Code style and code smells are checked by Detekt. The project also has an included code styles configuration for IDEA-based IDEs, please use the formatting tool to format your code automatically (macOS shortcut: ⌥⌘L)
By contributing to Carbon Compose, you agree that your contributions will be licensed under the Apache-2.0 license.
Thank you again for your contribution!