-
Notifications
You must be signed in to change notification settings - Fork 30
/
melos.yaml
138 lines (123 loc) · 3.9 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
name: ubuntu_desktop_provision
packages:
- packages/**
command:
bootstrap:
enforceLockfile: true
runPubGetInParallel: false
environment:
sdk: ">=3.0.0 <4.0.0"
flutter: '>=3.19.2'
dependencies:
args: ^2.4.2
async: ^2.11.0
collection: ^1.17.0
crypt: ^4.3.1
dbus: ^0.7.10
diacritic: ^0.1.5
ffi: ^2.1.0
file: ^7.0.0
flutter_html: ^3.0.0-beta.2
flutter_riverpod: ^2.5.1
flutter_spinbox: ^0.13.1
flutter_svg: ^2.0.10
form_field_validator: ^1.1.0
freezed_annotation: ^2.4.1
gsettings: ^0.2.8
handy_window: ^0.4.0
intl: ^0.18.1
json_annotation: ^4.9.0
meta: ^1.11.0
nm: ^0.5.0
package_config: ^2.1.0
path: ^1.8.3
platform: ^3.1.2
safe_change_notifier: ^0.3.2
scroll_to_index: ^3.0.1
split_view: ^3.2.1
stdlibc: ^0.1.4
ubuntu_flavor: ^0.4.0
ubuntu_localizations: ^0.3.5
ubuntu_logger: ^0.1.1
ubuntu_service: ^0.3.1
ubuntu_session: ^0.0.4
ubuntu_widgets: ^0.5.5
udev: ^0.0.3
upower: ^0.7.0
url_launcher: ^6.2.5
wizard_router: ^1.2.0
xdg_directories: ^1.0.4
xdg_locale: ^0.0.1
yaml: ^3.1.2
yaru: 4.1.0
yaru_window: 0.2.1
dev_dependencies:
build_runner: ^2.4.8
fake_async: ^1.3.1
ffigen: ^11.0.0
freezed: ^2.4.6
json_serializable: ^6.7.1
mockito: 5.4.4
plugin_platform_interface: ^2.1.8
test: any
ubuntu_lints: ^0.3.0
ubuntu_test: ^0.1.0-beta.8
url_launcher_platform_interface: ^2.3.2
yaru_test: ^0.1.6
scripts:
# 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 \
-o coverage/lcov.info
# format all packages' files except for generated files
format:exclude: >
melos exec -c 1 -- \
"find $MELOS_PACKAGE_PATH -name '*.dart' \
! -name '*.freezed.dart' \
! -name '*.g.dart' \
! -name '*.mocks.dart' \
! -path '*/l10n/*' \
! -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" -- \
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 --file-exists="lib/l10n.dart" -- \
flutter gen-l10n
# remove unused translations in all packages, you have to have jq installed.
clean-l10n: >
melos exec --depends-on="translations_cleaner" -c 1 -- \
dart run translations_cleaner clean-translations && \
find . -name "*.arb" -exec sh -c 'jq . --indent 2 {} > temp.json && mv temp.json {}' \;
# 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 exec -c 1 flutter pub upgrade
protoc:
run: |
rm -rf ./packages/provd_client/lib/src/generated/* &&
protoc --dart_out=grpc:./packages/provd_client/lib/src/generated \
-I./provd/protos ./provd/protos/*.proto google/protobuf/empty.proto google/protobuf/wrappers.proto