|
| 1 | +# Contributing to SeforimLibrary |
| 2 | + |
| 3 | +Thanks for your interest in contributing! SeforimLibrary is part of |
| 4 | +[Zayit](https://github.com/kdroidFilter/Zayit) and follows the same rules, which |
| 5 | +keep the project clean and legally clear. |
| 6 | + |
| 7 | +## License of your contributions (inbound = outbound) |
| 8 | + |
| 9 | +SeforimLibrary, like Zayit, is licensed under the **GNU AGPL v3** together with the **additional |
| 10 | +attribution term** under Section 7(b) of that license (the "Powered by the |
| 11 | +technologies that drive Zayit — https://zayitapp.com/" requirement). See |
| 12 | +[`LICENSE`](LICENSE) for the full text. |
| 13 | + |
| 14 | +By submitting a contribution (pull request, patch, or any other form), you agree |
| 15 | +that your contribution is licensed under the same terms as the project, namely |
| 16 | +the GNU AGPL v3 **and** the additional attribution term under Section 7(b), and |
| 17 | +under the Contributor License Agreement below. |
| 18 | + |
| 19 | +## Contributor License Agreement (CLA) |
| 20 | + |
| 21 | +Zayit is **open core** (see "Open core" in |
| 22 | +[Zayit's README](https://github.com/kdroidFilter/Zayit#open-core)): its core, |
| 23 | +SeforimLibrary included, is free under the AGPL v3, and its official builds also |
| 24 | +include proprietary modules, such as the smart siddur. So that your contribution can be part of those builds, |
| 25 | +you sign the [Zayit Contributor License Agreement](CLA.md) once: |
| 26 | + |
| 27 | +- You **keep the copyright** on your contribution — there is no copyright |
| 28 | + assignment. |
| 29 | +- You grant the maintainer a broad license on it, which allows distributing it |
| 30 | + under other terms too (including with proprietary modules), and a patent |
| 31 | + license. |
| 32 | + |
| 33 | +On your first pull request, the CLA bot asks you to sign by commenting: |
| 34 | + |
| 35 | +``` |
| 36 | +I have read the CLA Document and I hereby sign the CLA |
| 37 | +``` |
| 38 | + |
| 39 | +Your signature covers all your later pull requests. A CI check blocks a pull |
| 40 | +request until all its authors have signed. |
| 41 | + |
| 42 | +## Developer Certificate of Origin (DCO) |
| 43 | + |
| 44 | +Every commit must also be signed off under the |
| 45 | +[Developer Certificate of Origin 1.1](https://developercertificate.org/). By |
| 46 | +signing off, you certify that you wrote the code or otherwise have the right to |
| 47 | +submit it under the project's license. |
| 48 | + |
| 49 | +Add a sign-off line to each commit: |
| 50 | + |
| 51 | +``` |
| 52 | +Signed-off-by: Your Name <your.email@example.com> |
| 53 | +``` |
| 54 | + |
| 55 | +The easy way is to use the `-s` flag: |
| 56 | + |
| 57 | +```bash |
| 58 | +git commit -s -m "Your message" |
| 59 | +``` |
| 60 | + |
| 61 | +To sign off the last commit you forgot to sign: |
| 62 | + |
| 63 | +```bash |
| 64 | +git commit --amend -s --no-edit |
| 65 | +``` |
| 66 | + |
| 67 | +A CI check enforces that every commit in a pull request is signed off. |
| 68 | + |
| 69 | +<details> |
| 70 | +<summary>Full text of the Developer Certificate of Origin 1.1</summary> |
| 71 | + |
| 72 | +``` |
| 73 | +Developer Certificate of Origin |
| 74 | +Version 1.1 |
| 75 | +
|
| 76 | +By making a contribution to this project, I certify that: |
| 77 | +
|
| 78 | +(a) The contribution was created in whole or in part by me and I |
| 79 | + have the right to submit it under the open source license |
| 80 | + indicated in the file; or |
| 81 | +
|
| 82 | +(b) The contribution is based upon previous work that, to the best |
| 83 | + of my knowledge, is covered under an appropriate open source |
| 84 | + license and I have the right under that license to submit that |
| 85 | + work with modifications, whether created in whole or in part |
| 86 | + by me, under the same open source license (unless I am |
| 87 | + permitted to submit under a different license), as indicated |
| 88 | + in the file; or |
| 89 | +
|
| 90 | +(c) The contribution was provided directly to me by some other |
| 91 | + person who certified (a), (b) or (c) and I have not modified |
| 92 | + it. |
| 93 | +
|
| 94 | +(d) I understand and agree that this project and the contribution |
| 95 | + are public and that a record of the contribution (including all |
| 96 | + personal information I submit with it, including my sign-off) is |
| 97 | + maintained indefinitely and may be redistributed consistent with |
| 98 | + this project or the open source license(s) involved. |
| 99 | +``` |
| 100 | + |
| 101 | +</details> |
| 102 | + |
| 103 | +## Code style |
| 104 | + |
| 105 | +- Comments in code must be written in English. |
| 106 | +- Kotlin code must follow Kotlin conventions and idiomatic style. |
| 107 | +- Run the tests before opening a PR: |
| 108 | + |
| 109 | +```bash |
| 110 | +./gradlew test |
| 111 | +``` |
0 commit comments