20226caef4
- Delete eas.json and strip extra.eas.projectId from app.json - Add plugins/withAndroidReleaseSigning.js — Expo config plugin that injects release signingConfig into the generated build.gradle during expo prebuild - Add build-apk.sh — self-contained build script (expo prebuild + Gradle) Reads keystore credentials from ~/.config/postiz-mobile/signing.env Outputs APK/AAB to dist/, wipes credentials from gradle.properties after build - Add install-android-sdk.sh — one-time Android SDK cmdline-tools bootstrap - Remove unused expo-task-manager dependency - Update .gitignore: android/, ios/, static-build/ excluded (generated) Build workflow: 1. eas credentials --platform android # export keystore once 2. ./install-android-sdk.sh # first time only 3. ./build-apk.sh # → dist/postiz-mobile-YYYYMMDD-HHMM.apk Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
47 lines
1.5 KiB
Bash
Executable File
47 lines
1.5 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# install-android-sdk.sh — Install Android SDK command-line tools only (no Android Studio).
|
|
# Installs to ~/android-sdk. Run once; takes ~1 GB of disk space.
|
|
|
|
set -euo pipefail
|
|
|
|
SDK_DIR="$HOME/android-sdk"
|
|
CMDLINE_TOOLS_URL="https://dl.google.com/android/repository/commandlinetools-linux-12266719_latest.zip"
|
|
CMDLINE_ZIP="/tmp/android-cmdline-tools.zip"
|
|
|
|
GREEN='\033[0;32m'; NC='\033[0m'
|
|
info() { echo -e "${GREEN}[sdk-install]${NC} $*"; }
|
|
|
|
if [ -d "$SDK_DIR/cmdline-tools/latest/bin" ]; then
|
|
info "Android SDK already installed at $SDK_DIR"
|
|
exit 0
|
|
fi
|
|
|
|
info "Downloading Android command-line tools…"
|
|
wget -q --show-progress -O "$CMDLINE_ZIP" "$CMDLINE_TOOLS_URL"
|
|
|
|
info "Extracting…"
|
|
mkdir -p "$SDK_DIR/cmdline-tools"
|
|
unzip -q "$CMDLINE_ZIP" -d "$SDK_DIR/cmdline-tools"
|
|
mv "$SDK_DIR/cmdline-tools/cmdline-tools" "$SDK_DIR/cmdline-tools/latest"
|
|
rm "$CMDLINE_ZIP"
|
|
|
|
export ANDROID_HOME="$SDK_DIR"
|
|
export PATH="$PATH:$SDK_DIR/cmdline-tools/latest/bin:$SDK_DIR/platform-tools"
|
|
|
|
info "Accepting licenses…"
|
|
yes | sdkmanager --licenses > /dev/null 2>&1 || true
|
|
|
|
info "Installing SDK components (platform-tools, build-tools 35, NDK 28)…"
|
|
sdkmanager \
|
|
"platform-tools" \
|
|
"platforms;android-35" \
|
|
"build-tools;35.0.0" \
|
|
"ndk;28.0.12433566"
|
|
|
|
info "Done. Add this to your ~/.bashrc or ~/.zshrc:"
|
|
echo ""
|
|
echo ' export ANDROID_HOME="$HOME/android-sdk"'
|
|
echo ' export PATH="$PATH:$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools"'
|
|
echo ""
|
|
info "Then reload your shell: source ~/.bashrc"
|