|
| 1 | +# Developer Guide |
| 2 | + |
| 3 | +- [Technical Preconditions](#technical-preconditions) |
| 4 | + * [Dependency Management](#dependency-management) |
| 5 | + * [Generation of Localization Files in the app and ouds_core Folders](#generation-of-localization-files-in-the-app-and-ouds_core-folders) |
| 6 | +- [Commits, Changelog, Release Notes, Versioning](#commits-changelog-release-notes-versioning) |
| 7 | + * [Commit Guidelines](#commit-guidelines) |
| 8 | + * [Release Notes and Changelog](#release-notes-and-changelog) |
| 9 | +- [Documentation](#documentation) |
| 10 | +- [Installation](#installation) |
| 11 | + * [Generating Docs](#generating-docs) |
| 12 | + |
| 13 | +## Technical Preconditions |
| 14 | + |
| 15 | +You can refer to the **THIRD_PARTY.md** file, which lists the dependencies and tools we use at different levels (SDK, design system toolbox app, and projects). |
| 16 | +Check the lock files (*pubspec* and *pubspec.lock*) to see which versions are being used. |
| 17 | + |
| 18 | +### Dependency Management |
| 19 | + |
| 20 | +The project uses **Pub Workspace** via [Pub Workspaces](https://dart.dev/tools/pub/workspaces). |
| 21 | + |
| 22 | +The `pubspec.yaml` file at the root of the project manages all dependencies, so please use the following commands at the root to clean up the dependencies: |
| 23 | + |
| 24 | +```bash |
| 25 | +flutter clean |
| 26 | +flutter pub get |
| 27 | +``` |
| 28 | + |
| 29 | +### Generation of Localization Files in the `app` and `ouds_core` Folders |
| 30 | +To generate the localization files for the project, use the `flutter gen-l10n` command for each folder (`app` and `ouds_core`). |
| 31 | + |
| 32 | +You need to run this command because it generates the necessary localization files for your project, which helps Flutter manage translations for multiple languages. These files are crucial for the app to properly support localization and internationalization. |
| 33 | + |
| 34 | +```bash |
| 35 | +flutter gen-l10n |
| 36 | +``` |
| 37 | + |
| 38 | +## Commits, Changelog, Release Notes, Versioning |
| 39 | + |
| 40 | +### Commit Guidelines |
| 41 | + |
| 42 | +#### Conventional Commit Rules |
| 43 | + |
| 44 | +Please make every effort to follow [conventional commit rules](https://www.conventionalcommits.org/en/v1.0.0/). |
| 45 | +Ensure that your commits are properly prefixed and include the issue number in parentheses at the end. If applicable, also include the pull request issue number. |
| 46 | +If your commit includes contributions from others, don't forget to [add them as co-authors](https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors). |
| 47 | +All contributors should also comply with the DCO. |
| 48 | + |
| 49 | +Your commit messages should be prefixed with the following keywords (as specified in the [commit specification](https://www.conventionalcommits.org/en/v1.0.0/#specification)): |
| 50 | +- `fix:` |
| 51 | +- `feat:` |
| 52 | +- `build:` |
| 53 | +- `chore:` |
| 54 | +- `ci:` |
| 55 | +- `docs:` |
| 56 | +- `style:` |
| 57 | +- `refactor:` |
| 58 | +- `perf:` |
| 59 | +- `test:` |
| 60 | + |
| 61 | +You can also add `!` after the keyword to indicate a breaking change, and include a scope in parentheses like: |
| 62 | +- `feat!:` breaking change because... |
| 63 | +- `feat(API)!:` breaking change in the API because... |
| 64 | +- `feat:` adding a new feature to the API... |
| 65 | + |
| 66 | +#### Chain of Responsibility |
| 67 | + |
| 68 | +We can include metadata from [this guideline](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst#n525) in the commit messages. |
| 69 | +This is not mandatory (yet), but it's a good practice to indicate who reviewed and validated each commit. |
| 70 | +You must mention *co-authors* (using `Co-authored-by`), and you should include who are the code reviewers (`Reviewed-by`), testers (`Tested-by`), and if needed, ackers (`Acked-by`). |
| 71 | + |
| 72 | +### Release Notes and Changelog |
| 73 | + |
| 74 | +We also aim to [keep a changelog](https://keepachangelog.com/en/1.0.0/) and apply [semantic versioning](https://semver.org/spec/v2.0.0.html) along with [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/). |
| 75 | + |
| 76 | +## Documentation |
| 77 | + |
| 78 | +OUDS Flutter documentation is generated using the [Dart documentation generator](https://pub.dev/packages/dartdoc). |
| 79 | +Open the `ouds-flutter/library/doc/api` directory. |
| 80 | + |
| 81 | +More technical information about Dart documentation generation is available [here](https://pub.dev/packages/dartdoc). |
| 82 | + |
| 83 | +## Installation |
| 84 | + |
| 85 | +The `dart` tool, with the `dart doc` command, is part of the Dart SDK. |
| 86 | + |
| 87 | +### Generating Docs |
| 88 | + |
| 89 | +Run `dart doc .` from the `library/doc/api` directory of the package. You must first run `dart pub get` or `flutter pub get`, and your package must analyze without errors using `dart analyze` or `flutter analyze` as appropriate. Here's an example of `dartdoc` documenting itself: |
| 90 | + |
| 91 | +```bash |
| 92 | +$ dart doc . |
0 commit comments