9732a7e453
- kPrivacyPolicyUrl now holds the public Gitea raw URL (HTTP 200, full policy, title "Datenschutzerklaerung - Iron Arc", contact privacy@softwareapp-hb.de). Gitea serves it as text/plain, so a browser shows the markup; a real page is still recommended and documented in docs/status/blocked.md 3b. - verified on device: the tile triggers ACTION_VIEW for exactly this URL and Chrome opens it. - release guard rewritten to extract the URL itself and fail on an empty or placeholder value (the previous version matched its own marker constant). - docs: compliance row set to done, listing gained the Play privacy field, blocked.md documents the host upgrade plus the consequence that the repo has to stay public while the policy is served from it. - release 0.8.1 (11).
54 lines
2.1 KiB
Bash
Executable File
54 lines
2.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Builds a Play-ready App Bundle plus the native debug symbols.
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")/.."
|
|
export ANDROID_NDK_HOME="${ANDROID_NDK_HOME:-$HOME/Android/Sdk/ndk/28.2.13676358}"
|
|
|
|
echo '==> Rust release libraries'
|
|
cargo ndk --platform 24 -t arm64-v8a -t armeabi-v7a -o app/android/app/src/main/jniLibs build --release -p ffi
|
|
|
|
for abi in arm64-v8a armeabi-v7a; do
|
|
so="app/android/app/src/main/jniLibs/$abi/libffi.so"
|
|
# 16 KB pages are mandatory for 64-bit ABIs; 32-bit ARM still uses 4 KB.
|
|
case "$abi" in
|
|
arm64-v8a|x86_64) expect=0x4000 ;;
|
|
*) expect=0x1000 ;;
|
|
esac
|
|
if readelf -lW "$so" | awk -v e="$expect" '$1=="LOAD" && $NF!=e {found=1} END{exit !found}'; then
|
|
echo "ERROR: $abi is not aligned to $expect" >&2
|
|
exit 1
|
|
fi
|
|
echo "OK: $abi aligned to $expect ($(stat -c%s "$so") bytes)"
|
|
done
|
|
|
|
echo '==> Native debug symbols (unstripped)'
|
|
rm -rf build/native-symbols
|
|
mkdir -p build/native-symbols
|
|
for abi in arm64-v8a armeabi-v7a; do
|
|
mkdir -p "build/native-symbols/$abi"
|
|
cp "app/android/app/src/main/jniLibs/$abi/libffi.so" "build/native-symbols/$abi/"
|
|
done
|
|
(cd build/native-symbols && zip -qr ../native-debug-symbols.zip .)
|
|
echo "symbols: $(stat -c%s build/native-debug-symbols.zip) bytes"
|
|
|
|
echo '==> Release guards'
|
|
policy_url=$(grep -A1 'const String kPrivacyPolicyUrl' app/lib/src/ui/links.dart \
|
|
| grep -oE "https://[^']+" | head -1)
|
|
if [ -z "$policy_url" ] || printf '%s' "$policy_url" | grep -q 'example.invalid'; then
|
|
echo 'ERROR: privacy policy URL is missing or still the placeholder (app/lib/src/ui/links.dart).' >&2
|
|
echo ' Play rejects a listing whose privacy policy is not reachable.' >&2
|
|
exit 1
|
|
fi
|
|
echo "OK: privacy policy -> $policy_url"
|
|
|
|
echo '==> Flutter bundle (AAB)'
|
|
(cd app && flutter build appbundle --release)
|
|
|
|
AAB=app/build/app/outputs/bundle/release/app-release.aab
|
|
echo "aab: $(stat -c%s "$AAB") bytes"
|
|
unzip -l "$AAB" | grep -E 'lib/|AndroidManifest' | head -8
|
|
|
|
echo '==> Release APK for device smoke test'
|
|
(cd app && flutter build apk --release --target-platform android-arm64)
|
|
echo "apk: $(stat -c%s app/build/app/outputs/flutter-apk/app-release.apk) bytes"
|