-
Notifications
You must be signed in to change notification settings - Fork 180
Expand file tree
/
Copy pathmelos.yaml
More file actions
95 lines (79 loc) 路 2.94 KB
/
Copy pathmelos.yaml
File metadata and controls
95 lines (79 loc) 路 2.94 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
95
name: app_center
# Melos prepends `<sdkPath>/bin` to the PATH of every script it runs, so the
# scripts below resolve to the FVM-managed SDK without an explicit `fvm` prefix.
sdkPath: .fvm/flutter_sdk
packages:
- packages/*
command:
bootstrap:
enforceLockfile: true
environment:
sdk: '>=3.12.0 <4.0.0'
flutter: '>=3.44.2'
dev_dependencies:
ubuntu_lints: ^0.4.2
scripts:
# build all packages
build: >
melos exec -c 1 --fail-fast --flutter --dir-exists=linux -- \
flutter build linux
# collect coverage information for all packages
coverage: >
melos exec -c 1 --fail-fast --dir-exists=test -- \
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 \
'**/*.freezed.dart' \
'**/*.g.dart' \
'**/*.mocks.dart' \
'**/l10n/*.dart' \
'**/*.pb*.dart' \
--ignore-errors unused,unused \
-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 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 --order-dependents -- \
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 -- \
flutter gen-l10n
# sync app titles from l10n ARB files to desktop file
sync-desktop-titles: >
./scripts/import_app_title_to_desktop_file.py --arb-dir packages/app_center/lib/src/l10n --desktop-file packages/app_center/assets/app-center.desktop --name-variable appCenterLabel
# run integration tests in all packages
integration_test: >
melos exec -c 1 --fail-fast --dir-exists=integration_test -- \
flutter test integration_test
# runs "flutter pub <arg(s)>" in all packages
pub: melos exec -c 1 -- flutter pub "$@"
# run tests in all packages
test: >
melos exec -c 1 --fail-fast --dir-exists=test -- \
flutter test
# run pub upgrade in all packages
upgrade: melos pub upgrade
# run the app in dev mode
start: >
melos exec -c 1 --flutter --scope=app_center -- \
flutter run "$@"
# generate protobuf files in app_center_ratings_client
protoc:
run: |
rm -rf ./packages/app_center_ratings_client/lib/src/generated/* &&
protoc \
--dart_out=grpc:./packages/app_center_ratings_client/lib/src/generated \
-I./packages/app_center_ratings_client/protos ./packages/app_center_ratings_client/protos/*.proto \
google/protobuf/timestamp.proto google/protobuf/empty.proto