flutter_makefile 0.0.1
flutter_makefile: ^0.0.1 copied to clipboard
A CLI tool for Flutter projects that provides Makefile-style commands for common development tasks like building, testing, and running Flutter applications.
flutter_makefile #
A CLI tool to generate Makefile and package.json for Flutter projects with support for builds, testing, asset generation, and automated releases.
Requirements #
- Dart SDK
make(the CLI will check and provide installation instructions if not found)
Getting Started π #
If the CLI application is available on pub, activate globally via:
dart pub global activate flutter_makefile
Or locally via:
dart pub global activate --source=path <path to this package>
Usage #
# Initialize a new Makefile and package.json in your Flutter project
$ flutter_makefile init
# Initialize with custom app name
$ flutter_makefile init --app-name my_awesome_app
# Initialize with custom output directory
$ flutter_makefile init --output /path/to/project
# Force overwrite existing files
$ flutter_makefile init --force
# Show CLI version
$ flutter_makefile --version
# Show usage help
$ flutter_makefile --help
Init Command #
The init command generates a comprehensive Makefile and package.json for your Flutter project. It also checks if make is installed on your system and provides installation instructions if needed.
Generated Makefile includes:
- β Configurable build flavors and targets
- β Support for Android (APK/AAB) and iOS (IPA) builds
- β Firebase App Distribution integration
- β TestFlight distribution support
- β Asset generation (icons, splash screens)
- β Testing and code generation utilities
- β Compatible with or without FVM
Generated package.json includes:
- β Semantic-release configuration
- β Conventional commit support
- β Automated version management
- β Changelog generation
- β GitHub release automation
Options:
--output, -o- Specify output directory (default: current directory)--app-name, -n- App name for package.json (default: "app")--force, -f- Overwrite existing files
Example:
cd my_flutter_project
flutter_makefile init --app-name my_awesome_app
make npm_install
make run
Running Tests with coverage π§ͺ #
To run all unit tests use the following command:
$ dart pub global activate coverage 1.15.0
$ dart test --coverage=coverage
$ dart pub global run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info
To view the generated coverage report you can use lcov .
# Generate Coverage Report
$ genhtml coverage/lcov.info -o coverage/
# Open Coverage Report
$ open coverage/index.html