Skip to content

A collection of shell scripts for managing Flutter projects efficiently on macOS. An alterna

License

Notifications You must be signed in to change notification settings

chungxon/flutter_project_management_scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flutter Project Management Scripts

A collection of shell scripts for managing Flutter projects efficiently on macOS. An alternative to Melos or Puby.

Features

  • Automatic detection of all Flutter projects in your directory
  • Deep cleaning of Flutter projects
    • Runs flutter clean in all projects
    • Removes native build files and dependencies
    • Cleans iOS, Android, and macOS artifacts
  • Smart package management
    • Runs flutter pub get in all projects
    • Optional CocoaPods support for iOS
  • Project reset functionality
    • Combined clean and package retrieval
    • Maintains proper order of operations
  • Verbose mode for detailed output
  • Proper error handling and reporting
  • Progress tracking with timing information

Installation

  1. Place all three scripts in your root project directory:

    • flutter_clean.sh
    • flutter_get.sh
    • flutter_reset.sh
  2. Make the scripts executable:

    chmod +x flutter_clean.sh flutter_get.sh flutter_reset.sh

Usage

1. Clean Project(s)

./flutter_clean.sh [options]

Options:

  • -d, --deep Deep clean all Flutter projects (default: true)
  • -v, --verbose Show detailed output
  • -h, --help Show help message
  • --version Show version information

Examples:

./flutter_clean.sh            # Deep clean all Flutter projects
./flutter_clean.sh -d false   # Clean only the current Flutter project
./flutter_clean.sh -v        # Deep clean with verbose output

2. Get Packages

./flutter_get.sh [options]

Options:

  • -p, --pod Run 'pod install' for iOS after getting packages
  • -v, --verbose Show detailed output
  • -h, --help Show help message
  • --version Show version information

Examples:

./flutter_get.sh            # Get packages for all Flutter projects
./flutter_get.sh -p         # Get packages and run pod install
./flutter_get.sh -p -v      # Get packages and run pod install with verbose output

3. Reset Project(s)

./flutter_reset.sh [options]

Options:

  • -v, --verbose Show detailed output
  • -h, --help Show help message
  • --version Show version information

Examples:

./flutter_reset.sh         # Reset all Flutter projects
./flutter_reset.sh -v      # Reset with verbose output

Files Cleaned

The scripts clean the following files and directories:

  • iOS related:
    • ios/Pods
    • ios/Podfile.lock
    • ios/.symlinks
    • ios/Flutter/Flutter.framework
    • ios/Flutter/Flutter.podspec
  • Android related:
    • android/.gradle
    • android/build
    • android/app/build
    • android/local.properties
  • Flutter/Dart related:
    • build/
    • .dart_tool/
    • pubspec.lock
    • .flutter-plugins
    • .flutter-plugins-dependencies
    • .packages
    • .pub-cache
    • .pub
  • macOS related:
    • macos/Pods
    • macos/Podfile.lock
    • macos/.symlinks
  • Other:
    • coverage/
    • doc/
    • *.iml
    • *.log

Requirements

  • Flutter SDK installed and in PATH
  • bash shell
  • CocoaPods (optional, for iOS development)

Testing

The project includes a comprehensive test suite using Bash Automated Testing System (BATS). To run the tests:

  1. Install BATS:

    brew install bats-core
  2. Run the test suite:

    cd tests
    bats *.bats

The test suite includes:

  • Unit tests for all scripts
  • Mock Flutter project environment
  • Command-line argument testing
  • Error handling verification
  • Output format validation

License

This project is licensed under the MIT License - see the LICENSE file for details.


This README was generated using Windsurf.

About

A collection of shell scripts for managing Flutter projects efficiently on macOS. An alterna

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages