forked from fluttercommunity/plus_plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
melos.yaml
115 lines (95 loc) · 4.35 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
# Name of this workspace, this is used for display purpose on the CLI
# and on your IDEs.
name: plus_plugins
versioning:
# Versioning mode, currently only independent supported.
mode: independent
# Array of globs to search for packages.
packages:
- packages/**
scripts:
lint:all:
run: melos run analyze && melos run format
description: Run all static analysis checks
# Analyze the project for Dart analysis issues.
# - Requires `pub global activate tuneup`.
analyze:
run: |
melos exec -c 5 -- \
dart analyze . --fatal-infos
description: |
Run `dart analyze` in all packages.
- Note: you can also rely on your IDEs Dart Analysis / Issues window.
# Formats the code of all packages (Java, Objective-C, and Dart).
# - Requires `flutter_plugin_tools` (`pub global activate flutter_plugin_tools`).
# - Requires `git`.
# - Requires `clang-format` (can be installed via Brew on MacOS).
format: pub global run flutter_plugin_tools format
# Build iOS plugin example apps.
build:examples:ios: >
melos exec -c 1 --scope="*example*" --fail-fast -- \
flutter build ios --no-codesign
# Build example bundles.
build:examples:bundle: >
melos exec -c 1 --scope="*example*" --fail-fast -- \
flutter build bundle
# Build Android plugin example apps.
build:examples:android: >
melos exec -c 1 --scope="*example*" --fail-fast -- \
flutter build apk
# Build any plugin example apps that have MacOS support.
# - Requires `flutter config --enable-macos-desktop` enabled.
# - Requires `flutter channel master && flutter upgrade`.
build:examples:macos: >
melos exec -c 1 --scope="*example*" --dir-exists=macos --fail-fast -- \
flutter build macos
# Run standard flutter tests in all packages that have them.
test: >
melos exec -c 1 --fail-fast --dir-exists=test --ignore="*example*" --ignore="*web*" -- \
flutter test
test:web: >
melos exec -c 1 --fail-fast --dir-exists=test --scope="*web*" -- \
flutter test --platform=chrome
# Coverage
coverage: >
melos exec -c 1 --fail-fast --dir-exists=test --ignore="*example*" --ignore="*web*" -- \
flutter test --coverage
# Run all test driver e2e tests in the example apps, use this for mobile.
# Will target Android/iOS depending on what emulator/simulator you have running.
test:e2e: >
melos exec -c 1 --fail-fast --scope="*example*" --dir-exists=test_driver -- \
flutter drive --no-pub --target=./test_driver/MELOS_PARENT_PACKAGE_NAME_e2e.dart
# Run all web test driver e2e tests in the example apps.
# - Requires `flutter channel master && flutter upgrade`.
# - Requires `flutter config --enable-web` enabled.
test:e2e:web: >
melos exec -c 1 --fail-fast --dir-exists=web --scope="*example*" --dir-exists=test_driver -- \
flutter drive --release -d chrome --no-pub --verbose-system-logs --browser-name=chrome --target=./test_driver/MELOS_PARENT_PACKAGE_NAME_e2e.dart
# Run all Linux test driver e2e tests in the example apps.
# - Requires `flutter config --enable-linux-desktop` enabled.
# - Requires `flutter channel dev && flutter upgrade`.
test:e2e:linux: >
melos exec -c 1 --fail-fast --dir-exists=linux --scope="*example*" --dir-exists=test_driver -- \
xvfb-run -a flutter drive -d linux --no-pub --target=./test_driver/MELOS_PARENT_PACKAGE_NAME_e2e.dart
# Run all MacOS test driver e2e tests in the example apps.
# - Requires `flutter config --enable-macos-desktop` enabled.
# - Requires `flutter channel master && flutter upgrade`.
test:e2e:macos: >
melos exec -c 1 --fail-fast --dir-exists=macos --scope="*example*" --dir-exists=test_driver -- \
flutter drive -d macos --no-pub --target=./test_driver/MELOS_PARENT_PACKAGE_NAME_e2e.dart
# Check pubspecs are valid and publishable in each package.
lint:pub: >
melos exec -c 5 --fail-fast --no-private --ignore="*example*" -- \
pub publish --dry-run
# Clean things very deeply, can be used to establish "pristine checkout" status
clean:deep: >
git clean -x -d -f -q
# Additional cleanup lifecycle script, executed when `melos clean` is ran.
postclean: >
melos exec -- \
rm -rf ./build ./android/.gradle ./ios/.symlinks ./ios/Pods ./android/.idea ./.idea ./.dart-tool/build
dev_dependencies:
pedantic: 1.10.0
environment:
sdk: ">=2.12.0 <3.0.0"
flutter: ">=1.12.13+hotfix.5"