Thank you for considering contributing to our Android Jetpack Compose Library project. Your contributions help make this project better for everyone.
- Code of Conduct
- How to Contribute
- Reporting Issues
- Pull Requests
- Development Setup
- Coding Standards
- Code Quality
- Documentation
- Running Tests
- Creating ADRs
This project adheres to a Code of Conduct. By participating, you are expected to uphold this code. Please report any unacceptable behavior to [email protected].
If you find a bug or have a feature request, please open an issue in the issue tracker. Be sure to include:
- A descriptive title.
- A detailed explanation of the issue or request.
- Steps to reproduce the issue (if applicable).
- Any relevant screenshots or logs.
We welcome your pull requests! To ensure a smooth process, please follow these steps:
-
Fork the Repository:
- Create your own copy of the repository by clicking the
Fork
button on GitHub.
- Create your own copy of the repository by clicking the
-
Clone the Forked Repository:
git clone https://github.com/your-username/compose-library.git
-
Create a New Branch:
git checkout -b feature/your-feature-name
-
Make Your Changes:
- Develop your feature or fix on the new branch. Ensure that you follow the coding standards.
-
Commit Your Changes:
- Use clear and concise commit messages.
git commit -m "Add a concise and descriptive commit message"
-
Push Your Changes:
git push origin feature/your-feature-name
-
Submit a Pull Request:
- Go to the original repository and click
New pull request
. - Provide a detailed description of your changes.
- Link to any relevant issues or ADRs if applicable.
- Go to the original repository and click
Follow these steps to set up your development environment:
-
Clone the Repository:
git clone https://github.com/your-repo/compose-library.git
-
Navigate to the Project Directory:
cd compose-library
-
Open the Project in Android Studio:
- Open the project folder in Android Studio:
- File > Open... and select the cloned repository folder.
- Open the project folder in Android Studio:
-
Sync Project with Gradle Files:
- Android Studio should automatically resolve and fetch dependencies when you open the project.
-
Run Tests:
- Ensure all tests pass by selecting
Run > Run...
and choosing the test configuration.
- Ensure all tests pass by selecting
Please adhere to the following coding standards to ensure consistency:
- Follow the Kotlin Coding Conventions.
- Follow Markdown and YAML style guides:
- Markdown: Follow the Markdown Guide.
- YAML: Adhere to typical YAML syntax and style rules.
To maintain high code quality, we use the following linters and tools in our CI/CD pipeline. Please ensure your code adheres to these standards before submitting a pull request:
-
Android Lint:
-
Android Lint checks the code for potential bugs, stylistic errors, and other issues.
-
You can run Android Lint manually using the following command:
./gradlew lint
-
-
Markdown Lint:
-
Linting for Markdown can be done using
markdownlint-cli
:npm install -g markdownlint-cli markdownlint '**/*.md'
-
-
YAML Lint:
-
Linting for YAML files can be done using
yamllint
:brew install yamllint yamllint .
-
Our CI/CD pipeline will automatically run these linters on every pull request to ensure code quality. Here is a summary of the checks performed:
- Android Lint: Ensures Android code adheres to style and quality guidelines.
- Markdown Lint: Checks Markdown files for style and syntax correctness.
- YAML Lint: Checks YAML files for syntax errors and style issues.
Make sure your code passes these checks before opening a pull request.
Good documentation helps others understand your code. Please:
- Update the
DEVELOPMENT.md
file if your changes affect the development process. - Ensure your code is well-commented, especially for complex logic.
- Update or create relevant ADRs in the
docs/adr
directory.
To run the test suite:
-
Open the Project in Android Studio:
- Open the project folder in Android Studio.
-
Run Tests:
-
Run the test suite by selecting
Run > Run Tests
or by using the command:./gradlew testDebugUnitTest ./gradlew connectedAndroidTest
-
Ensure that all tests pass before submitting your pull request.
Architecture Decision Records (ADRs) document significant architectural decisions made during the project. When you need to record an architectural decision, follow these steps:
-
Create an ADR Document:
- ADRs should be created in the
docs/adr
directory. - Use the template provided in
docs/adr-xx-Template.md
.
- ADRs should be created in the
-
Document the Decision:
- Follow the structure in the template.
-
Review and Approval:
- Submit the ADR for review by creating a pull request.
- The ADR must be approved by the Maintainers/Codeowners before it is merged. This ensures that all architectural decisions are aligned with the project's overall strategy.
Thank you for contributing to the Android Jetpack Compose Library project. Your efforts help improve the project for everyone. We appreciate your time and dedication!