Files
mobile-android/watch.sh
2026-01-08 19:06:37 +05:00

24 lines
656 B
Bash

#!/bin/bash
echo "🔄 Watching for changes and auto-rebuilding..."
echo "📱 Device: $(adb devices | grep device | head -1)"
echo ""
# Function to build and install
build_and_install() {
echo "🔨 Building and installing..."
cd /Users/ruslanmakhmatov/Desktop/Work/rosette-app/rosetta-android
./gradlew installDebug --quiet
if [ $? -eq 0 ]; then
echo "✅ Successfully installed at $(date '+%H:%M:%S')"
else
echo "❌ Build failed at $(date '+%H:%M:%S')"
fi
echo ""
}
# Watch for changes in Kotlin files
fswatch -o app/src/main/java/com/rosetta/messenger/**/*.kt | while read; do
build_and_install
done