Surface the commit a build came from as a placeholder version identifier,
until a proper version scheme exists.
- rust/lib: build.rs captures the commit hash at compile time (CI env
override, else jj/git, else "unknown") and exposes it via a new
version module plus a build_info() uniffi export.
- CLI: new 'about' command printing version and full commit hash.
- GUI: About card in settings, fed by a BuildInfo Slint global.
- Android: About section in settings, with the commit selectable/copyable.
- CI: pass GITEA_SHA into the APK build step so the embedded hash is
deterministic.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Resolve all paths from REPO_ROOT to eliminate fragile cd/relative
path issues. Add diagnostic steps to trace where the APK ends up.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Cap Gradle workers and Cargo build jobs to 2 each so the build
doesn't starve the machine of CPU.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
AGP tries to write metrics/settings to ~/.android but HOME is unset
in CI, causing it to write to /.android (read-only root filesystem).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The stacktrace shows Gradle 9's daemon JVM toolchain provisioning
tries to download a JDK, which requires native SystemInfo to detect
CPU architecture. Disabling auto-download makes Gradle use the JDK
already provided via JAVA_HOME. Also reverts buildFHSEnv and
diagnostics since the issue was never about native library paths.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Check FHS env, /proc access, java version, and gradle.properties.
Run Gradle with --stacktrace for native init failure details.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Nix gradle is 8.14.4 but AGP 9.1.0 requires Gradle 9.1+. Switch back
to the Gradle wrapper (which downloads 9.3.1) but run it inside the
buildFHSEnv so native-platform .so files can find standard library paths.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The Nix-packaged gradle likely disables native-platform by default.
Force it on since we're running inside buildFHSEnv which provides
the standard library paths native-platform needs.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Gradle extracts native .so files at runtime from JARs. These unpatched
binaries need standard FHS paths (/lib64, /usr/lib) to find their
dependencies. buildFHSEnv creates a chroot with standard paths while
keeping /nix/store accessible.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The Gradle wrapper downloads an unpatched binary distribution whose
native-platform .so has a hardcoded ELF interpreter that doesn't exist
in Nix. Use Nix-packaged Gradle which has properly patched binaries.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Set org.gradle.native=false to fix SystemInfo service error in Nix sandbox
- Add --no-daemon for CI efficiency
- Derive NDK clang binary name from minSdk instead of hardcoding API level 33
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- flake.nix: dev shell with Android SDK 35, NDK 28, Rust 1.92
(with aarch64-linux-android target), typeshare, and JDK 17
- .gitea/workflows/build-apk.yml: builds debug APK on push to
master, creates a pre-release with the APK attached
(for consumption by Obtainium)
- docs/BUILD.md: local dev setup, CI runner setup, and
Obtainium configuration instructions
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>