Skip to content

Instantly share code, notes, and snippets.

@brackendev
Created December 15, 2021 21:30
Show Gist options
  • Select an option

  • Save brackendev/50363369bde72bdfea14528d9760571c to your computer and use it in GitHub Desktop.

Select an option

Save brackendev/50363369bde72bdfea14528d9760571c to your computer and use it in GitHub Desktop.
Clean Flutter project
#!/bin/sh
rm -rf .dart_tool
rm -rf build
rm -rf ~/.gradle
rm -rf .gradle
rm -rf android/.gradle
rm -f pubspec.lock
flutter clean
flutter pub get
flutter packages pub run build_runner build --delete-conflicting-outputs
flutter pub run flutter_launcher_icons:main
flutter pub run flutter_native_splash:create
cd ios
rm -rf build
rm -rf "${HOME}/Library/Developer/Xcode/DerivedData/"
xcodebuild -configuration "Debug" clean
xcodebuild -configuration "Release" clean
pod deintegrate
rm -f Podfile.lock
rm -rf Pods
rm -rf "${HOME}/Library/Caches/CocoaPods"
pod cache clean --all
pod repo update
pod install
cd ..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment