forked from SimpleBoilerplates/Flutter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b0a767b
commit 0a9533d
Showing
10 changed files
with
106 additions
and
114 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
.PHONY: all run_dev_web run_dev_mobile run_unit clean upgrade lint format build_dev_mobile help | ||
|
||
all: lint format run_dev_mobile | ||
|
||
# Adding a help file: https://gist.github.com/prwhite/8168133#gistcomment-1313022 | ||
help: ## This help dialog. | ||
@IFS=$$'\n' ; \ | ||
help_lines=(`fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//'`); \ | ||
for help_line in $${help_lines[@]}; do \ | ||
IFS=$$'#' ; \ | ||
help_split=($$help_line) ; \ | ||
help_command=`echo $${help_split[0]} | sed -e 's/^ *//' -e 's/ *$$//'` ; \ | ||
help_info=`echo $${help_split[2]} | sed -e 's/^ *//' -e 's/ *$$//'` ; \ | ||
printf "%-30s %s\n" $$help_command $$help_info ; \ | ||
done | ||
|
||
run_unit: ## Runs unit tests | ||
@echo "╠ Running the tests" | ||
@flutter test || (echo "Error while running tests"; exit 1) | ||
|
||
clean: ## Cleans the environment | ||
@echo "╠ Cleaning the project..." | ||
@rm -rf pubspec.lock | ||
@flutter clean | ||
@flutter pub get | ||
|
||
watch: ## Watches the files for changes | ||
@echo "╠ Watching the project..." | ||
@flutter pub run build_runner watch --delete-conflicting-outputs | ||
|
||
gen: ## Generates the assets | ||
@echo "╠ Generating the assets..." | ||
@flutter pub get | ||
@flutter packages pub run build_runner build | ||
|
||
format: ## Formats the code | ||
@echo "╠ Formatting the code" | ||
@dart format lib . | ||
@flutter pub run import_sorter:main | ||
@flutter format lib | ||
|
||
lint: ## Lints the code | ||
@echo "╠ Verifying code..." | ||
@dart analyze . || (echo "Error in project"; exit 1) | ||
|
||
upgrade: clean ## Upgrades dependencies | ||
@echo "╠ Upgrading dependencies..." | ||
@flutter pub upgrade | ||
|
||
commit: format lint run_unit | ||
@echo "╠ Committing..." | ||
git add . | ||
git commit | ||
|
||
run_dev_web: ## Runs the web application in dev | ||
@echo "╠ Running the app" | ||
@flutter run -d chrome --dart-define=ENVIRONMENT=dev | ||
|
||
run_dev_mobile: ## Runs the mobile application in dev | ||
@echo "╠ Running the app" | ||
@flutter run --flavor development -t lib/main_development.dart | ||
|
||
run_stg_mobile: ## Runs the mobile application in dev | ||
@echo "╠ Running the app" | ||
@flutter run --flavor staging -t lib/main_staging.dart | ||
|
||
run_prd_mobile: ## Runs the mobile application in dev | ||
@echo "╠ Running the app" | ||
@flutter run --flavor production -t lib/main_production.dart | ||
|
||
build_apk_dev: ## Runs the mobile application in dev | ||
@flutter clean | ||
@flutter pub get | ||
@flutter build apk --flavor development -t lib/main_development.dart | ||
|
||
build_apk_stg: ## Runs the mobile application in staging | ||
@flutter clean | ||
@flutter pub get | ||
@flutter build apk --flavor staging -t lib/main_staging.dart | ||
|
||
build_apk_prod: ## Runs the mobile application in prod | ||
@flutter clean | ||
@flutter pub get | ||
@flutter build apk --flavor production -t lib/main_production.dart | ||
|
||
purge: ## Purges the Flutter | ||
@pod deintegrate | ||
@flutter clean | ||
@flutter pub get | ||
|
||
|
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
import 'package:flutter_boilerplate/app/app.dart'; | ||
import 'package:flutter_boilerplate/counter/counter.dart'; | ||
import 'package:flutter_test/flutter_test.dart'; | ||
|
||
import 'package:flutter_boilerplate/app/app.dart'; | ||
|
||
void main() { | ||
group('App', () { | ||
testWidgets('renders CounterPage', (tester) async { | ||
await tester.pumpWidget(App()); | ||
expect(find.byType(CounterPage), findsOneWidget); | ||
}); | ||
}); | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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