Skip to content

Android development

Android is a Gradle application plus a native CMake build. It uses SDL3, ABI-specific native artifacts, Java activity/HUD integration, Android resources, packaged game data, and distinct debug/release signing paths.

Authoritative entry points

  • android/gradlew, android/app/build.gradle, and android/app/jni/CMakeLists.txt define the local application and native build.
  • android/app/src/main/AndroidManifest.xml and Java sources define the application/UI bridge.
  • .github/workflows/matrix.yml contains the current build-only Android CI lane.
  • .github/workflows/release-android-bundle.yaml defines release bundle and signing behavior.

Narrow validation first

From android/, use the wrapper and keep the SDK/NDK configuration outside Git:

./gradlew test
./gradlew assembleDebug

The first command exercises JVM unit tests such as the Android HUD model/geometry/schema tests. APK assembly additionally requires a configured SDK/NDK and copies native/game assets. Report variant, ABI, SDK/NDK, Gradle/Java versions, SDL version, install device, and install result.

Runtime boundaries

Java owns Activity lifecycle, storage paths, Android HUD/editor/dialogs, and calls into the native layer through the defined bridge. Native code owns the game runtime. Preserve pause/ resume, surface/renderer recreation, text input, touch coordinates, storage permission, and desktop/Android behavior boundaries.

Packaging and security

Never commit local.properties, SDK paths, keystores, passwords, signed APK/AAB files, Gradle state, or generated native libraries. CI release signing uses secrets and should expose only the intended bundle/artifacts. Debug installs do not validate release signing or store delivery.

Failure evidence

Capture commit, variant/ABI, device/API level, exact Gradle task, the first Gradle/CMake error, and a focused logcat crash section. Distinguish Java exception, native tombstone, renderer recovery, asset-copy, install/signature, and storage-path failures.