Created
August 29, 2025 18:28
-
-
Save ethicnology/6cd19ebdfe819e9ecb52a891ca1dbd20 to your computer and use it in GitHub Desktop.
Flutter makefile for new projects
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .PHONY: fvm-check setup clean dependencies build-runner translations pods-update test unit-test integration-test | |
| fvm-check: | |
| @echo "π Checking FVM" | |
| @if ! command -v fvm >/dev/null 2>&1; then \ | |
| echo "β FVM is not installed. Please install FVM first:"; \ | |
| exit 1; \ | |
| fi | |
| @echo "β FVM is installed" | |
| @fvm install | |
| init: | |
| @echo "π Initializing a new project" | |
| @git init | |
| @flutter create . | |
| @fvm use | |
| setup: fvm-check dependencies build-runner translations pods-update | |
| @echo "π Setup complete!" | |
| dependencies: | |
| @echo "π Fetch dependencies" | |
| @fvm flutter clean | |
| @rm -f pubspec.lock | |
| @fvm flutter pub get | |
| build-runner: | |
| @echo "ποΈ Build runner for json_serializable and flutter_gen" | |
| @fvm dart run build_runner build --delete-conflicting-outputs | |
| translations: | |
| @echo "π Generating translations files" | |
| @fvm flutter gen-l10n | |
| pods-update: | |
| @echo "ο£Ώ Fetching dependencies" | |
| @fvm flutter precache --ios | |
| @cd ios && rm -f Podfile.lock && pod install --repo-update && cd - | |
| test: unit-test integration-test | |
| unit-test: | |
| @echo "πβ running unit tests" | |
| @fvm flutter test test/ --reporter=compact | |
| integration-test: | |
| @echo "π§ͺ integration tests" | |
| @fvm flutter test integration_test/ --reporter=compact |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment