Skip to content

Commit 00a6850

Browse files
authored
docs: Add CONTRIBUTING.md and CODEOWNERS (#5)
1 parent c527d4d commit 00a6850

File tree

3 files changed

+72
-15
lines changed

3 files changed

+72
-15
lines changed

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Make @harrytmthy-dev the code owner of all files
2+
* @harrytmthy-dev

CONTRIBUTING.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Contributing to SafeBox
2+
3+
Thank you for considering contributing! SafeBox welcomes improvements, bug fixes, documentation updates, and feature ideas, especially from Android developers who care about performance and clean architecture.
4+
5+
## Local Setup
6+
7+
```bash
8+
git clone https://github.com/harrytmthy-dev/safebox.git
9+
```
10+
11+
### Update pre-hook path
12+
13+
`scripts/` contains shared pre-hooks for formatting and test validation. To enable it locally:
14+
15+
```bash
16+
git config --local core.hooksPath scripts
17+
chmod +x scripts/pre-commit
18+
chmod +x scripts/pre-push
19+
```
20+
21+
### Run Spotless
22+
23+
```bash
24+
./gradlew spotlessApply --init-script gradle/init.gradle.kts --no-configuration-cache
25+
```
26+
27+
## Commit & PR Guidelines
28+
29+
- Use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) (e.g. `feat:`, `fix:`, `docs:`, `refactor:`).
30+
- Keep PRs focused and small.
31+
- If your change affects the public API, update `README.md` or `MIGRATION.md` accordingly.
32+
- GitHub Actions will automatically run tests and checks upon opening or updating a PR.
33+
- Ensure all checks pass before merging.
34+
35+
### Creating a PR
36+
37+
1. Fork the repo and create your feature branch (`git checkout -b feature/amazing-feature`)
38+
2. Push your changes (`git push origin feature/amazing-feature`)
39+
3. Open a Pull Request against the `main` branch of the original repository
40+
41+
## Testing
42+
43+
Run all tests locally with:
44+
45+
```bash
46+
./gradlew testDebugUnitTest
47+
./gradlew connectedAndroidTest
48+
```
49+
50+
CI runs instrumented tests automatically on:
51+
- Android API 26
52+
- Android API 34
53+
54+
## Contributor Etiquette
55+
56+
- Discuss major changes or feature proposals first via [Issues](https://github.com/harrytmthy-dev/safebox/issues).
57+
- Be respectful during reviews! We're building something safe and friendly.
58+
- If anything is unclear, don't hesitate to ask!
59+
60+
## Releasing (For Maintainers)
61+
62+
Only maintainers can perform releases:
63+
- Tag with semantic versioning (`v1.1.0-alpha02`)
64+
- Update `CHANGELOG.md`
65+
- Run: `./gradlew publishToMavenCentral --no-configuration-cache`
66+
67+
---
68+
69+
Thanks again for contributing to SafeBox! You're helping shape a faster, safer Android future.

README.md

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -107,21 +107,7 @@ SafeBox is a drop-in replacement for `EncryptedSharedPreferences`.
107107

108108
## Contributing
109109

110-
### Update pre-hook path
111-
112-
`scripts/` contains shared pre-hooks for formatting and test validation. To enable it locally:
113-
114-
```bash
115-
git config --local core.hooksPath scripts
116-
chmod +x scripts/pre-commit
117-
chmod +x scripts/pre-push
118-
```
119-
120-
### Run Spotless
121-
122-
```bash
123-
./gradlew spotlessApply --init-script gradle/init.gradle.kts --no-configuration-cache
124-
```
110+
See [CONTRIBUTING.md](CONTRIBUTING.md) for setup, formatting, testing, and PR guidelines.
125111

126112
## License
127113

0 commit comments

Comments
 (0)