Thanks for taking the time to contribute. This guide documents the project's branching model, commit conventions, and how to build and run the application locally.
We follow a lightweight GitFlow:
mainis the production-ready branch. It only receives changes via pull requests fromdev(release promotion PRs).devis the integration branch. Feature work lands here.- Feature branches branch off
devand merge back intodev.
| Prefix | Use case |
|---|---|
feat/ |
New user-visible feature. |
fix/ |
Bug fix. |
refactor/ |
Code change that does not alter behavior. |
perf/ |
Performance improvement. |
chore/ |
Maintenance: build, deps, config, repo housekeeping. |
docs/ |
Documentation only. |
test/ |
Adding or fixing tests. |
ci/ |
Continuous integration configuration. |
release/ |
Promoting dev to main. |
hotfix/ |
Urgent fix straight onto main. |
Examples: feat/jni-bridge, fix/wallet-balance-sync, chore/update-deps,
docs/casos-de-uso-perfil.
We use Conventional Commits.
<type>(<scope>): <subject>
<body>
<footer>
| Type | Meaning |
|---|---|
feat |
New user-visible feature. |
fix |
Bug fix. |
refactor |
Code change that does not alter behavior. |
perf |
Performance improvement. |
style |
Whitespace, formatting, lint fixes (no logic changes). |
test |
Adding or fixing tests. |
docs |
Documentation only. |
chore |
Maintenance: build, deps, config, repo housekeeping. |
build |
Changes to the build system or external dependencies. |
ci |
Continuous integration configuration. |
revert |
Reverting a previous commit. |
cpp-engine: Native C++ engine (provably fair core, JNI bridge).android: Android module (Kotlin, Compose, Gradle).entrega: TPO entrega documentation.ci: GitHub Actions workflows.- Add new scopes as needed.
- Imperative mood, lowercase, no trailing period.
- Under 70 characters.
- Explain the why and any non-obvious how.
- Wrap at ~72 characters per line.
- Separate from subject with a blank line.
- Reference related issues:
Refs #123,Closes #456. - For breaking changes, start the footer with
BREAKING CHANGE: ....
feat(android): add NativeGameEngine Kotlin wrapper and JNI smoke test
Introduces NativeGameEngine, the single Kotlin class that crosses the
JNI boundary. It exposes the five external fun entry points wired to
the corresponding C++ exports and loads libcasino-engine.so once via
a companion-object init block.
refactor(cpp-engine): replace OpenSSL with self-contained HMAC-SHA256
Adds Sha256.h, a header-only implementation of SHA-256 (FIPS 180-4)
and HMAC-SHA256 (RFC 2104) under the casino:: namespace.
-
Branch off the latest
dev:git checkout dev git pull origin dev git checkout -b feat/<name>
-
Make atomic commits following Conventional Commits.
-
Push the branch and open a PR targeting
dev:git push -u origin feat/<name> gh pr create --base dev --fill
-
Use the PR template (it appears automatically) to describe the change.
-
Merge with the default merge method. Squashing and rebasing are disabled to preserve granular commit history. The branch is auto-deleted after merge.
To promote dev to main, open a release/<version> branch with no
new commits (only the integration merge) and PR it to main.
- ASCII-style prose. Single hyphens, not em-dashes. No emojis.
- Use Spanish for entrega documentation. Use English for code,
commits, PR descriptions, and
.github/assets.
- Follow the project's
.editorconfigand the default Android Studio Kotlin formatter. RunCode -> Reformat Codebefore committing. - Compose composables use PascalCase. State is hoisted unless trivial.
- Public APIs include KDoc.
- Follow
cpp_engine/.clang-format(Google base, two-space indent, 100-column lines). - Public methods include Doxygen comments.
- No dynamic allocation in the hot path of the engine.
# From the repository root.
./gradlew assembleDebug # Build the debug APK (includes native).
./gradlew installDebug # Install on the first connected device.
./gradlew testDebugUnitTest # Run JVM unit tests (when present).
./gradlew connectedDebugAndroidTest # Run instrumentation tests on device.cd cpp_engine
cmake -B build
cmake --build build
./build/casino_testThe desktop build is OpenSSL-free; it uses the self-contained
HMAC-SHA256 implementation in cpp_engine/include/Sha256.h.
The Android module compiles the C++ engine via CMake. See
app/src/main/cpp/CMakeLists.txt. The resulting libcasino-engine.so
covers arm64-v8a, armeabi-v7a, x86, and x86_64. No external
libraries are pulled in.
Use the issue templates under .github/ISSUE_TEMPLATE/. Include logs,
device information, and a minimal reproduction whenever possible.