#!/bin/sh
# Full build: native executables (rsync + rsh via the NDK), then the APK.
# Requires the pinned toolchain (see versions): Android SDK + NDK, a JDK, Go.
set -eu

root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)

make -C "$root" app
git -C "$root" rev-parse HEAD > "$root/app/build/outputs/apk/release/.source-commit"

echo "ci: APK at app/build/outputs/apk/release/"
ls -l "$root"/app/build/outputs/apk/release/*.apk
