README: rewritten to the brand voice, with the new logo, Pilot as the recommended install and a Frappe Cloud button. The old PNG logo is gone. iPad: the primary rail now pads the status bar inset itself, since it sits beside <main> and never got it. The bridge view controller overrides supportedInterfaceOrientations because Capacitor builds its mask from the iPhone list in Info.plist only, which pinned the iPad to portrait. Android release: a signing config read from a gitignored keystore.properties, and scripts/playstore.sh, which builds the signed bundle the same way testflight.sh archives for iOS. Both are wired to yarn native:playstore. Build number 314 for both platforms. Store screenshot tooling and the demo site seed are ignored; they are local tooling, not part of the app. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
35 lines
1.7 KiB
Bash
Executable File
35 lines
1.7 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Builds the signed Android app bundle for Google Play: `yarn native:playstore` from the repo root.
|
|
# The version code is shared with iOS and bumped by testflight.sh; this script leaves it alone.
|
|
set -euo pipefail
|
|
|
|
cd "$(dirname "$0")/.."
|
|
[[ -f android/keystore.properties ]] || { echo "android/keystore.properties is missing; the bundle would be unsigned." >&2; exit 1; }
|
|
|
|
# Gradle's toolchain check wants JDK 21. Android Studio ships one.
|
|
STUDIO_JDK="/Applications/Android Studio.app/Contents/jbr/Contents/Home"
|
|
[[ -d "$STUDIO_JDK" ]] && export JAVA_HOME="$STUDIO_JDK"
|
|
|
|
# Machine-local files set aside for the build and put back on any exit, as testflight.sh does.
|
|
aside=$(mktemp -d)
|
|
local_files=(../web/.env.local ../web/.env.native.local capacitor.config.local.json)
|
|
restore() { for f in "${local_files[@]}"; do [[ -f "$aside/$(basename "$f")" ]] && mv "$aside/$(basename "$f")" "$f"; done; rmdir "$aside" 2>/dev/null || true; }
|
|
trap restore EXIT
|
|
for f in "${local_files[@]}"; do [[ -f "$f" ]] && mv "$f" "$aside/"; done
|
|
|
|
(cd ../web && yarn build:native)
|
|
npx cap sync android
|
|
|
|
# A dev override in the synced config means the local file leaked; stop before bundling.
|
|
if grep -q "allowMixedContent\": true" android/app/src/main/assets/capacitor.config.json 2>/dev/null; then
|
|
echo "allowMixedContent is on in the synced config; not bundling." >&2
|
|
exit 1
|
|
fi
|
|
|
|
(cd android && ./gradlew bundleRelease -q)
|
|
version=$(grep -m1 -o 'versionName "[0-9.]*"' android/app/build.gradle | grep -o '[0-9.]*')
|
|
code=$(grep -m1 -o 'versionCode [0-9]*' android/app/build.gradle | grep -o '[0-9]*$')
|
|
mkdir -p release
|
|
cp android/app/build/outputs/bundle/release/app-release.aab "release/Raven-$version-$code.aab"
|
|
echo "Bundled $version ($code) at release/Raven-$version-$code.aab"
|