-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjustfile
More file actions
94 lines (77 loc) · 2.15 KB
/
justfile
File metadata and controls
94 lines (77 loc) · 2.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
default:
just --list
# Show all commands and info
help:
just --list
# Runs app
run flavor:
fvm flutter run lib/main.dart --flavor {{flavor}}
# Runs app release
run-release flavor:
fvm flutter run lib/main.dart --flavor {{flavor}} --release
# Build ios
build-ios flavor:
fvm flutter build ipa lib/main.dart --flavor {{flavor}}
# Build android
build-android flavor:
fvm flutter build appbundle lib/main.dart --flavor {{flavor}}
# Codgen build
codegen:
fvm flutter pub run build_runner build --delete-conflicting-outputs
# Codegen watch
codegen-watch:
fvm flutter pub run build_runner watch --delete-conflicting-outputs
# Clean project
clean:
fvm flutter clean
# Install deps
install-deps:
fvm flutter pub get
# Clean and get
clean-and-get:
just clean
just install-deps
# Generate locales
locales:
fvm dart run intl_utils:generate
# Test
# Note: on macOS you need to have lcov installed on your system (`brew install lcov`) to use this:
test:
fvm flutter test --coverage --test-randomize-ordering-seed random
lcov --remove coverage/lcov.info \
'**/generated/**' \
'**/*.g.dart' \
'**/*.freezed.dart' \
'**/generated_plugin_registrant.dart' \
--ignore-errors unused \
-o coverage/lcov_clean.info
genhtml coverage/lcov_clean.info -o coverage/html
open coverage/html/index.html
# Test specific file with coverage
test-file file:
fvm flutter test --coverage {{file}}
lcov --remove coverage/lcov.info \
'**/generated/**' \
'**/*.g.dart' \
'**/*.freezed.dart' \
'**/generated_plugin_registrant.dart' \
--ignore-errors unused \
-o coverage/lcov_clean.info
genhtml coverage/lcov_clean.info -o coverage/html
open coverage/html/index.html
# e2e test
e2e-test flavor file deviceId:
fvm flutter test integration_test/{{flavor}}/{{file}}.dart --flavor {{flavor}} -d {{deviceId}}
# Initial project setup
setup:
just clean-and-get
just locales
just codegen
just generate_assets_app_files
generate_openapi:
openapi-generator generate \
-i "../fastlight-clientes.api/openapi.yml" \
-g dart \
-o ./lib/src/api
generate_assets_app_files:
dart run scripts/generate_assets_app_files.dart