|
| 1 | +# Contributing to DashboardFx |
| 2 | + |
| 3 | +Thanks for taking the time to contribute to DashboardFx. |
| 4 | +This guide explains how to prepare the project, make a focused change, and open a pull request. |
| 5 | + |
| 6 | +## Prerequisites |
| 7 | + |
| 8 | +Before working on the project, install: |
| 9 | + |
| 10 | +- Git |
| 11 | +- Java 23 or newer |
| 12 | +- An IDE with Java and Gradle support |
| 13 | + |
| 14 | +You do not need to install Gradle globally. Use the Gradle Wrapper included in this repository. |
| 15 | + |
| 16 | +## Fork and Clone |
| 17 | + |
| 18 | +Fork the repository on GitHub, then clone your fork with submodules: |
| 19 | + |
| 20 | +```bash |
| 21 | +git clone --recursive https://github.com/<your-username>/DashboardFx.git |
| 22 | +cd DashboardFx |
| 23 | +``` |
| 24 | + |
| 25 | +The `--recursive` option clones the project submodules too: |
| 26 | + |
| 27 | +- `glad` |
| 28 | +- `presentation` |
| 29 | +- `blockcode` |
| 30 | + |
| 31 | +If you already cloned the project without submodules, initialize them with: |
| 32 | + |
| 33 | +```bash |
| 34 | +git submodule update --init --recursive |
| 35 | +``` |
| 36 | + |
| 37 | +## Create a Branch |
| 38 | + |
| 39 | +Create your working branch from the latest `alpha` branch: |
| 40 | + |
| 41 | +```bash |
| 42 | +git switch alpha |
| 43 | +git pull origin alpha |
| 44 | +git switch -c <your-branch-name> |
| 45 | +``` |
| 46 | + |
| 47 | +Pull requests should target the `alpha` branch unless the maintainers request a different target. |
| 48 | + |
| 49 | +## Build and Run |
| 50 | + |
| 51 | +On Windows, build and run the project with: |
| 52 | + |
| 53 | +```powershell |
| 54 | +.\gradlew build |
| 55 | +.\gradlew run |
| 56 | +``` |
| 57 | + |
| 58 | +On Linux or macOS, use: |
| 59 | + |
| 60 | +```bash |
| 61 | +./gradlew build |
| 62 | +./gradlew run |
| 63 | +``` |
| 64 | + |
| 65 | +Run the build before opening a pull request to make sure the project still compiles. |
| 66 | + |
| 67 | +## Keep Changes Focused |
| 68 | + |
| 69 | +Each pull request should focus on one task. |
| 70 | +Avoid mixing unrelated changes in the same pull request. |
| 71 | + |
| 72 | +Please do not include: |
| 73 | + |
| 74 | +- generated files |
| 75 | +- IDE-only files |
| 76 | +- unrelated formatting changes |
| 77 | +- accidental submodule updates |
| 78 | +- changes from another task |
| 79 | + |
| 80 | +If your task does not require changing a submodule, leave `glad`, `presentation`, and `blockcode` untouched. |
| 81 | + |
| 82 | +## Commit Your Work |
| 83 | + |
| 84 | +Check your changes before committing: |
| 85 | + |
| 86 | +```bash |
| 87 | +git status |
| 88 | +git diff |
| 89 | +``` |
| 90 | + |
| 91 | +Stage only the files related to your task: |
| 92 | + |
| 93 | +```bash |
| 94 | +git add CONTRIBUTING.md |
| 95 | +git commit -m "docs: add contributing guide" |
| 96 | +``` |
| 97 | + |
| 98 | +## Open a Pull Request |
| 99 | + |
| 100 | +Push your branch: |
| 101 | + |
| 102 | +```bash |
| 103 | +git push -u fork <your-branch-name> |
| 104 | +``` |
| 105 | + |
| 106 | +Then open a pull request against `alpha`. |
| 107 | +In the pull request description, include: |
| 108 | + |
| 109 | +- what changed |
| 110 | +- why the change is useful |
| 111 | +- how you checked or tested it |
| 112 | + |
| 113 | +Thank you for helping improve DashboardFx. |
0 commit comments