Use incremental build
All checks were successful
🏗️ Build and Test JellyTau / Run Tests (pull_request) Successful in 3m57s
Traceability Validation / Check Requirement Traces (pull_request) Successful in 21s
🏗️ Build and Test JellyTau / Build Android APK (pull_request) Successful in 19m5s

This commit is contained in:
Duncan Tourolle 2026-07-02 20:01:43 +02:00
parent a64e1b1fb4
commit 37455bc470
2 changed files with 26 additions and 11 deletions

View File

@ -3,15 +3,19 @@
set -e set -e
BUILD_TYPE="${1:-debug}"
echo "🚀 Build and Deploy Android APK" echo "🚀 Build and Deploy Android APK"
echo "" echo ""
# Build APK # Pass all args (build type and/or --clean) through to the build script.
./scripts/build-android.sh "$BUILD_TYPE" ./scripts/build-android.sh "$@"
echo "" echo ""
# Deploy APK # Deploy APK — extract build type (default debug), ignoring flags like --clean.
BUILD_TYPE="debug"
for arg in "$@"; do
case "$arg" in
debug|release) BUILD_TYPE="$arg" ;;
esac
done
./scripts/deploy-android.sh "$BUILD_TYPE" ./scripts/deploy-android.sh "$BUILD_TYPE"

View File

@ -15,13 +15,24 @@ echo "Android SDK: $ANDROID_HOME"
echo "NDK: $NDK_HOME" echo "NDK: $NDK_HOME"
echo "" echo ""
# Build type: debug or release (default: debug) # Parse args: build type (debug/release) and optional --clean flag.
BUILD_TYPE="${1:-debug}" # By default the build is INCREMENTAL — Cargo and Vite reuse their caches.
# Pass --clean (or CLEAN=1) to wipe all caches for a from-scratch build.
BUILD_TYPE="debug"
CLEAN="${CLEAN:-0}"
for arg in "$@"; do
case "$arg" in
--clean) CLEAN=1 ;;
debug|release) BUILD_TYPE="$arg" ;;
esac
done
# Step 0: Clear build caches to ensure fresh builds # Step 0: Optionally clear build caches for a fully fresh build.
echo "🧹 Clearing build caches..." if [ "$CLEAN" = "1" ]; then
rm -rf node_modules/.vite dist .svelte-kit .next build target src-tauri/target 2>/dev/null || true echo "🧹 Clearing build caches (clean build)..."
npm install > /dev/null 2>&1 rm -rf node_modules/.vite dist .svelte-kit .next build target src-tauri/target 2>/dev/null || true
npm install > /dev/null 2>&1
fi
# Step 1: Sync Android source files # Step 1: Sync Android source files
echo "🔄 Syncing Android sources..." echo "🔄 Syncing Android sources..."