-
Notifications
You must be signed in to change notification settings - Fork 13
/
melos.yaml
90 lines (73 loc) · 2.32 KB
/
melos.yaml
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
name: ubuntu_flutter_plugins
sdkPath: .fvm/flutter_sdk
packages:
- packages/**
command:
bootstrap:
environment:
sdk: ">=3.0.0 <4.0.0"
flutter: ">=3.24.3"
dependencies:
collection: ^1.18.0
flutter_svg: ^2.0.10+1
intl: ^0.19.0
meta: ^1.15.0
path: ^1.9.0
dev_dependencies:
mockito: 5.4.4
publish:
hooks:
pre: melos gen-l10n
scripts:
# analyze all packages
analyze: >
melos exec -c 1 -- \
fvm flutter analyze .
# build examples in all packages
build: >
melos exec -c 1 --fail-fast --flutter --scope="*example*" --dir-exists=linux -- \
fvm flutter build linux
# collect coverage information for all packages
coverage: >
melos exec -c 1 --fail-fast --dir-exists=test -- \
fvm flutter test --coverage && melos run coverage:cleanup
# cleanup generated files from coverage
coverage:cleanup: >
melos exec --file-exists=coverage/lcov.info -- \
lcov --remove coverage/lcov.info '**/*.g.dart' '**/*.freezed.dart' -o coverage/lcov.info
# format all packages
format:exclude: >
find . -name '*.dart' \
! -name '*.freezed.dart' \
! -name '*.g.dart' \
! -name '*.mocks.dart' \
! -path '*/l10n/*.dart' \
! -name '*.pb*.dart' \
! -path '*/.*/*' \
| xargs fvm dart format --set-exit-if-changed
# run build_runner to generate code in all packages
generate: >
melos exec -c 1 --fail-fast --depends-on=build_runner -- \
fvm dart run build_runner build --delete-conflicting-outputs
# run gen-l10n to generate localizations in all packages
gen-l10n:
melos exec -c 1 --fail-fast --depends-on=flutter_localizations -- \
fvm flutter gen-l10n
# run integration tests in all packages
integration_test: >
melos exec -c 1 --dir-exists=integration_test -- \
fvm flutter test integration_test
# runs "flutter pub <arg(s)>" in all packages
pub: melos exec -c 1 -- fvm flutter pub "$@"
# run tests in all packages
test: >
melos exec -c 1 --dir-exists=test -- \
fvm flutter test
# run pub upgrade in all packages
upgrade: melos exec fvm flutter pub upgrade
# update all goldens files
update-goldens:
run: melos exec -- fvm flutter test --update-goldens
packageFilters:
dirExists: test
description: Re-generate all golden test files