Repository navigation
Expand file tree
/
Copy pathpubspec.yaml
More file actions
157 lines (137 loc) · 4.79 KB
/
Copy pathpubspec.yaml
File metadata and controls
157 lines (137 loc) · 4.79 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
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
name: sourcepoint_unified_cmp_workspace
homepage: https://github.com/thekorn/sourcepoint_unified_cmp
repository: https://github.com/thekorn/sourcepoint_unified_cmp
environment:
sdk: "^3.9.0"
flutter: ">=3.44.0"
dev_dependencies:
melos: ^7.7.0
pana: ^0.23.12
workspace:
- packages/sourcepoint_unified_cmp
- packages/sourcepoint_unified_cmp/example
- packages/sourcepoint_unified_cmp/example_spm
- packages/sourcepoint_unified_cmp_android
- packages/sourcepoint_unified_cmp_flutter_inappwebview_extension
- packages/sourcepoint_unified_cmp_flutter_inappwebview_extension/example
- packages/sourcepoint_unified_cmp_flutter_webview_extension
- packages/sourcepoint_unified_cmp_flutter_webview_extension/example
- packages/sourcepoint_unified_cmp_ios
- packages/sourcepoint_unified_cmp_platform_interface
melos:
name: sourcepoint_unified_cmp
sdkPath: .fvm/flutter_sdk
command:
clean:
hooks:
post: melos exec --concurrency=1 -- "fvm flutter clean"
version:
# Generate commit links in package changelogs.
#linkToCommits: true
# # Only allow versioning to happen on main branch.
# branch: master
# Additionally build a changelog at the root of the workspace.
workspaceChangelog: true
scripts:
analyze: fvm flutter analyze .
pana: fvm dart run pana . --exit-code-threshold 40 2>&1
format:all:
run: |
melos format && \
swiftformat . 2>&1 && \
ktlint --format '**/*.kt' '**/*.kts' '!**/*.g.kt'
description: |
- Requires `swiftformat` (can be installed via Brew on macOS).
- Requires `ktlint` (can be installed via Brew on macOS).
test:all:
run: |
melos run test --no-select && \
npx cspell "**/*.md" 2>&1 && \
melos run merge-trace-files && \
melos run check-coverage
description: |
Run all tests available.
test:
run: |
melos exec -c 1 --fail-fast -- \
"fvm flutter test --coverage"
description: Run `flutter test` for a specific package.
packageFilters:
dirExists:
- test
ignore:
- "*example*"
merge-trace-files:
# Merge all packages coverage trace files ignoring data related to generated files.
# FIXME: include all webview extension packages once they ship tests
description: Merge all packages coverage trace files ignoring data related to generated files.
run: >
coverde remove
--no-dry-run
MELOS_ROOT_PATH/coverage/filtered.lcov.info
&&
melos exec
--file-exists coverage/lcov.info
--
"
coverde transform
--input coverage/lcov.info
--output MELOS_ROOT_PATH/coverage/filtered.lcov.info
--transformations relative=MELOS_ROOT_PATH
--transformations skip-by-glob='**/*.g.dart'
"
check-coverage:
description: Check the coverage of the packages.
run: >
coverde check -i MELOS_ROOT_PATH/coverage/filtered.lcov.info 20
generate:pigeon:
run: |
melos exec --concurrency=1 -- "fvm flutter pub run pigeon --input ./pigeons/messages.dart"
packageFilters:
fileExists: "pigeons/messages.dart"
description: Generate the pigeon messages for supported packages.
generate:pigeon:all:
run: |
melos run generate:pigeon --no-select && \
melos run format:all
description: Generate the pigeon messages for all the supported packages.
generate:mocks:
run: |
melos exec --concurrency=1 -- "fvm flutter pub run build_runner build --delete-conflicting-outputs"
packageFilters:
dependsOn:
- build_runner
description: Generate mocks for tests.
generate:mocks:all:
run: |
melos run generate:mocks --no-select && \
melos run format:all
description: Generate mocks for all tests.
run:example:
run: fvm flutter run
description: Run the example app.
exec:
concurrency: 1
packageFilters:
scope: "sourcepoint_unified_cmp_example"
run:example:spm:
run: fvm flutter run
description: Run the example app with Swift Package Manager enabled.
exec:
concurrency: 1
packageFilters:
scope: "sourcepoint_unified_cmp_example_spm"
run:example:flutter_webview:
run: fvm flutter run
description: Run the example flutter webview app.
exec:
concurrency: 1
packageFilters:
scope: "sourcepoint_unified_cmp_flutter_webview_extension_example"
run:example:flutter_inappwebview:
run: fvm flutter run
description: Run the example flutter inappwebview app.
exec:
concurrency: 1
packageFilters:
scope: "sourcepoint_unified_cmp_flutter_inappwebview_extension_example"