@echo off
echo ===== Membersihkan Cache Flutter Secara Menyeluruh =====

REM Kill semua proses Flutter
echo Menghentikan semua proses Flutter yang berjalan...
taskkill /F /IM dart.exe /T
taskkill /F /IM flutter.exe /T
taskkill /F /IM java.exe /T

REM Hapus cache build
echo Membersihkan build cache...
flutter clean

REM Hapus cache pub
echo Membersihkan pub cache...
flutter pub cache clean

REM Hapus cache platform
echo Membersihkan platform-specific caches...
rmdir /S /Q %USERPROFILE%\.gradle\caches
rmdir /S /Q .dart_tool
rmdir /S /Q .idea\libraries
rmdir /S /Q .idea\modules
rmdir /S /Q .idea\workspace.xml
rmdir /S /Q build
rmdir /S /Q .flutter-plugins
rmdir /S /Q .flutter-plugins-dependencies

REM Get packages lagi
echo Mendapatkan packages...
flutter pub get

echo ===== Cache dibersihkan! =====
echo Silakan jalankan aplikasi dengan: flutter run
pause 