Skip to content

Commit ec337c6

Browse files
authored
ci: enable usePubspecOverrides (#10046)
1 parent d94a4ba commit ec337c6

File tree

75 files changed

+510
-644
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+510
-644
lines changed

.github/workflows/all_plugins.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ jobs:
9595
- name: 'Build Examples'
9696
run: |
9797
melos exec -c 1 --scope="*example*" --dir-exists="web" -- \
98-
"flutter build web --no-pub"
98+
"flutter build web"
9999
100100
test:
101101
runs-on: ubuntu-latest
@@ -132,4 +132,4 @@ jobs:
132132
# for the `check-license-header` script.
133133
run-bootstrap: false
134134
- name: Check license header
135-
run: melos run check-license-header
135+
run: melos run check-license-header

.github/workflows/e2e_tests.yaml

+20
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ jobs:
7474
with:
7575
channel: 'stable'
7676
cache: true
77+
- uses: bluefireteam/melos-action@v2
78+
with:
79+
run-bootstrap: false
80+
- name: "Bootstrap package"
81+
run: melos bootstrap --scope tests
7782
- name: "Install Tools"
7883
run: |
7984
sudo npm i -g firebase-tools
@@ -148,6 +153,11 @@ jobs:
148153
with:
149154
channel: 'stable'
150155
cache: true
156+
- uses: bluefireteam/melos-action@v2
157+
with:
158+
run-bootstrap: false
159+
- name: "Bootstrap package"
160+
run: melos bootstrap --scope tests
151161
- name: "Install Tools"
152162
run: |
153163
sudo npm i -g firebase-tools
@@ -215,6 +225,11 @@ jobs:
215225
with:
216226
channel: 'stable'
217227
cache: true
228+
- uses: bluefireteam/melos-action@v2
229+
with:
230+
run-bootstrap: false
231+
- name: "Bootstrap package"
232+
run: melos bootstrap --scope tests
218233
- name: "Install Tools"
219234
run: |
220235
sudo npm i -g firebase-tools
@@ -256,6 +271,11 @@ jobs:
256271
with:
257272
channel: 'stable'
258273
cache: true
274+
- uses: bluefireteam/melos-action@v2
275+
with:
276+
run-bootstrap: false
277+
- name: "Bootstrap package"
278+
run: melos bootstrap --scope tests
259279
- name: "Install Tools"
260280
run: |
261281
sudo npm i -g firebase-tools

.github/workflows/firebase_firestore_odm.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ jobs:
4141
melos bootstrap --scope="*firebase_core*" --scope="$FLUTTERFIRE_PLUGIN_SCOPE"
4242
melos run odm:example_build_runner:build
4343
melos run odm:generator_test_build_runner:build
44-
# Needed because generating breaks the local linking of melos
45-
melos bootstrap --scope="*firebase_core*" --scope="$FLUTTERFIRE_PLUGIN_SCOPE"
4644
- name: "Flutter Test"
4745
run: melos run odm:test:flutter --no-select
4846
- name: "Dart Test"

.github/workflows/scripts/drive-example.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ then
77
# Sleep to allow emulator to settle.
88
sleep 15
99
melos exec -c 1 --fail-fast --scope="$FLUTTERFIRE_PLUGIN_SCOPE_EXAMPLE" --dir-exists=integration_test -- \
10-
flutter test integration_test/MELOS_PARENT_PACKAGE_NAME_e2e_test.dart $FLUTTER_COMMAND_FLAGS --no-pub --dart-define=CI=true
10+
flutter test integration_test/MELOS_PARENT_PACKAGE_NAME_e2e_test.dart $FLUTTER_COMMAND_FLAGS --dart-define=CI=true
1111
exit
1212
fi
1313

@@ -22,7 +22,7 @@ then
2222
# Uncomment following line to have simulator logs printed out for debugging purposes.
2323
# xcrun simctl spawn booted log stream --predicate 'eventMessage contains "flutter"' &
2424
melos exec -c 1 --fail-fast --scope="$FLUTTERFIRE_PLUGIN_SCOPE_EXAMPLE" --dir-exists=integration_test -- \
25-
flutter test integration_test/MELOS_PARENT_PACKAGE_NAME_e2e_test.dart $FLUTTER_COMMAND_FLAGS -d \"$SIMULATOR\" --no-pub --dart-define=CI=true
25+
flutter test integration_test/MELOS_PARENT_PACKAGE_NAME_e2e_test.dart $FLUTTER_COMMAND_FLAGS -d \"$SIMULATOR\" --dart-define=CI=true
2626
MELOS_EXIT_CODE=$?
2727
xcrun simctl shutdown "$SIMULATOR"
2828
exit $MELOS_EXIT_CODE
@@ -31,7 +31,7 @@ fi
3131
if [ "$ACTION" == "macos" ]
3232
then
3333
melos exec -c 1 --fail-fast --scope="$FLUTTERFIRE_PLUGIN_SCOPE_EXAMPLE" --dir-exists=test_driver -- \
34-
flutter test integration_test/MELOS_PARENT_PACKAGE_NAME_e2e_test.dart $FLUTTER_COMMAND_FLAGS -d macos --no-pub --dart-define=CI=true
34+
flutter test integration_test/MELOS_PARENT_PACKAGE_NAME_e2e_test.dart $FLUTTER_COMMAND_FLAGS -d macos --dart-define=CI=true
3535
exit
3636
fi
3737

@@ -40,6 +40,6 @@ then
4040
melos bootstrap --scope="*firebase_core*" --scope="$FLUTTERFIRE_PLUGIN_SCOPE"
4141
chromedriver --port=4444 &
4242
melos exec -c 1 --scope="$FLUTTERFIRE_PLUGIN_SCOPE_EXAMPLE" --dir-exists=web -- \
43-
flutter drive $FLUTTER_COMMAND_FLAGS --no-pub --verbose-system-logs --device-id=web-server --target=./integration_test/MELOS_PARENT_PACKAGE_NAME_e2e_test.dart --driver=./test_driver/integration_test.dart --dart-define=CI=true
43+
flutter drive $FLUTTER_COMMAND_FLAGS --verbose-system-logs --device-id=web-server --target=./integration_test/MELOS_PARENT_PACKAGE_NAME_e2e_test.dart --driver=./test_driver/integration_test.dart --dart-define=CI=true
4444
exit
4545
fi

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
.pub/
1111
.dart_tool/
1212
pubspec.lock
13+
pubspec_overrides.yaml
1314
flutter_export_environment.sh
1415

1516
examples/all_plugins/pubspec.yaml

.vscode/settings.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"dart.runPubGetOnPubspecChanges": false,
2+
"dart.runPubGetOnPubspecChanges": "always",
33
}

.vscode/tasks.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,14 @@
6262
{
6363
"label": "firestore -> test:e2e",
6464
"type": "shell",
65-
"command": "melos exec -c 1 --scope=\"*cloud_firestore_example*\" --fail-fast --dir-exists=integration_test -- flutter drive --no-pub --target=./integration_test/MELOS_PARENT_PACKAGE_NAME_e2e_test.dart",
65+
"command": "melos exec -c 1 --scope=\"*cloud_firestore_example*\" --fail-fast --dir-exists=integration_test -- flutter drive --target=./integration_test/MELOS_PARENT_PACKAGE_NAME_e2e_test.dart",
6666
"detail": "Run end-to-end testing for Android & iOS via `flutter drive` on the Firestore example application",
6767
"problemMatcher": []
6868
},
6969
{
7070
"label": "firestore -> test:e2e:web",
7171
"type": "shell",
72-
"command": "melos exec -c 1 --scope=\"*cloud_firestore_example*\" --dir-exists=web --fail-fast --dir-exists=test_driver -- flutter drive --release -d chrome --no-pub --verbose-system-logs --browser-name=chrome --target=./integration_test/MELOS_PARENT_PACKAGE_NAME_e2e_test.dart --driver=./test_driver/integration_test.dart",
72+
"command": "melos exec -c 1 --scope=\"*cloud_firestore_example*\" --dir-exists=web --fail-fast --dir-exists=test_driver -- flutter drive --release -d chrome --verbose-system-logs --browser-name=chrome --target=./integration_test/MELOS_PARENT_PACKAGE_NAME_e2e_test.dart --driver=./test_driver/integration_test.dart",
7373
"detail": "Run end-to-end testing for Web via `flutter drive` on the Firestore example application",
7474
"problemMatcher": []
7575
},

melos.yaml

+18-18
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@ name: FlutterFire
22
repository: https://github.com/firebase/flutterfire
33

44
packages:
5-
- packages/**
6-
- 'tests/*'
5+
- packages/*
6+
- packages/*/*
7+
- packages/*/*/*
8+
- tests
79

810
command:
911
version:
@@ -16,7 +18,7 @@ command:
1618

1719
changelogs:
1820
- path: firebase_ui_changelog.md
19-
packageFilters:
21+
packageFilters:
2022
scope: firebase_ui_*
2123
description: |
2224
All notable changes for firebase_ui packages
@@ -26,6 +28,7 @@ command:
2628
# https://github.com/dart-lang/pub/issues/3404). Disabling this feature
2729
# makes the CI much more stable.
2830
runPubGetInParallel: false
31+
usePubspecOverrides: true
2932

3033
scripts:
3134
lint:all:
@@ -64,23 +67,19 @@ scripts:
6467
run: |
6568
melos run build:example_ios_pub --no-select && \
6669
melos run build:example_android_pub --no-select && \
67-
melos run build:example_macos --no-select && \
68-
melos bootstrap
70+
melos run build:example_macos --no-select
6971
description: Build all example apps.
7072

7173
build:example_android:
7274
run: |
7375
melos exec -c 6 --fail-fast -- \
74-
"flutter build apk --no-pub"
76+
"flutter build apk"
7577
description: Build a specific example app for Android.
7678
select-package:
7779
dir-exists:
7880
- android
7981
scope: '*example*'
8082

81-
# melos bootstrap does not generate all files generated by a build that runs
82-
# `pub get`, and `flutter drive` does not either, so it is still necessary to
83-
# build sometimes without the `--no-pub` switch. Careful: `melos bootstrap` after.
8483
build:example_android_pub:
8584
run: |
8685
melos exec -c 6 --fail-fast -- \
@@ -94,16 +93,13 @@ scripts:
9493
build:example_ios:
9594
run: |
9695
melos exec -c 6 --fail-fast -- \
97-
"flutter build ios --no-codesign --no-pub"
96+
"flutter build ios --no-codesign"
9897
description: Build a specific example app for iOS.
9998
select-package:
10099
dir-exists:
101100
- ios
102101
scope: '*example*'
103102

104-
# melos bootstrap does not generate all files generated by a build that runs
105-
# `pub get`, and `flutter drive` does not either, so it is still necessary to
106-
# build sometimes without the `--no-pub` switch. Careful: `melos bootstrap` after.
107103
build:example_ios_pub:
108104
run: |
109105
melos exec -c 6 --fail-fast -- \
@@ -117,7 +113,7 @@ scripts:
117113
build:example_macos:
118114
run: |
119115
melos exec -c 6 --fail-fast -- \
120-
"flutter build macos --no-pub"
116+
"flutter build macos"
121117
description: |
122118
Build a specific example app for macOS.
123119
select-package:
@@ -136,7 +132,7 @@ scripts:
136132
test:
137133
run: |
138134
melos exec -c 6 --fail-fast -- \
139-
"flutter test --no-pub"
135+
"flutter test"
140136
description: Run `flutter test` for a specific package.
141137
select-package:
142138
dir-exists:
@@ -149,7 +145,7 @@ scripts:
149145
test:web:
150146
run: |
151147
melos exec -c 1 --fail-fast -- \
152-
"flutter test --no-pub --platform=chrome"
148+
"flutter test --platform=chrome"
153149
description: Run `flutter test --platform=chrome` for a specific '*web' package.
154150
select-package:
155151
dir-exists:
@@ -159,7 +155,7 @@ scripts:
159155
test:e2e:
160156
run: |
161157
melos exec -c 1 --fail-fast -- \
162-
"flutter test integration_test/e2e_test.dart --no-pub"
158+
"flutter test integration_test/e2e_test.dart"
163159
description: |
164160
Run all e2e tests.
165161
select-package:
@@ -170,7 +166,7 @@ scripts:
170166
test:e2e:web:
171167
run: |
172168
melos exec -c 1 --fail-fast -- \
173-
"flutter drive --no-pub --target=./integration_test/e2e_test.dart --driver=./test_driver/integration_test.dart -d chrome"
169+
"flutter drive --target=./integration_test/e2e_test.dart --driver=./test_driver/integration_test.dart -d chrome"
174170
description: |
175171
Run all e2e tests on web platform. Please ensure you have "chromedriver" installed and running.
176172
select-package:
@@ -292,6 +288,8 @@ scripts:
292288
--ignore "**/FlutterMultiDexApplication.java" \
293289
--ignore "**/GeneratedPluginRegistrant.swift" \
294290
--ignore "**/Pods/**" \
291+
--ignore "**/flutter/generated_plugin_registrant.h" \
292+
--ignore "**/flutter/generated_plugin_registrant.cc" \
295293
.
296294
description: Add a license header to all necessary files.
297295

@@ -325,5 +323,7 @@ scripts:
325323
--ignore "**/FlutterMultiDexApplication.java" \
326324
--ignore "**/GeneratedPluginRegistrant.swift" \
327325
--ignore "**/Pods/**" \
326+
--ignore "**/flutter/generated_plugin_registrant.h" \
327+
--ignore "**/flutter/generated_plugin_registrant.cc" \
328328
.
329329
description: Add a license header to all necessary files.

packages/cloud_firestore/cloud_firestore/example/pubspec.yaml

+2-18
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,12 @@ environment:
66
flutter: '>=1.12.13+hotfix.4'
77

88
dependencies:
9-
cloud_firestore:
10-
path: ../
11-
firebase_core:
12-
path: ../../../firebase_core/firebase_core
9+
cloud_firestore: any
10+
firebase_core: any
1311
flutter:
1412
sdk: flutter
1513
http: ^0.13.3
1614

17-
dependency_overrides:
18-
_flutterfire_internals:
19-
path: ../../../_flutterfire_internals
20-
cloud_firestore_platform_interface:
21-
path: ../../cloud_firestore_platform_interface
22-
cloud_firestore_web:
23-
path: ../../cloud_firestore_web
24-
firebase_core:
25-
path: ../../../firebase_core/firebase_core
26-
firebase_core_platform_interface:
27-
path: ../../../firebase_core/firebase_core_platform_interface
28-
firebase_core_web:
29-
path: ../../../firebase_core/firebase_core_web
30-
3115
dev_dependencies:
3216
integration_test:
3317
sdk: flutter

packages/cloud_firestore_odm/cloud_firestore_odm/example/pubspec.yaml

+5-32
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,9 @@ environment:
66
sdk: ">=2.16.0 <3.0.0"
77

88
dependencies:
9-
cloud_firestore:
10-
path: ../../../cloud_firestore/cloud_firestore
11-
cloud_firestore_odm:
12-
path: ../../cloud_firestore_odm
13-
firebase_core:
14-
path: ../../../firebase_core/firebase_core
9+
cloud_firestore: any
10+
cloud_firestore_odm: any
11+
firebase_core: any
1512
flutter:
1613
sdk: flutter
1714
freezed_annotation: ^2.0.0
@@ -20,10 +17,8 @@ dependencies:
2017

2118
dev_dependencies:
2219
build_runner: ^2.0.0
23-
cloud_firestore_odm_generator:
24-
path: ../../cloud_firestore_odm_generator
25-
cloud_firestore_odm_generator_integration_test:
26-
path: ../../cloud_firestore_odm_generator/cloud_firestore_odm_generator_integration_test
20+
cloud_firestore_odm_generator: any
21+
cloud_firestore_odm_generator_integration_test: any
2722
flutter_test:
2823
sdk: flutter
2924
freezed: ^2.0.0
@@ -33,27 +28,5 @@ dev_dependencies:
3328
json_serializable: ^6.3.0
3429
mockito: ^5.0.0
3530

36-
dependency_overrides:
37-
_flutterfire_internals:
38-
path: ../../../_flutterfire_internals
39-
cloud_firestore:
40-
path: ../../../cloud_firestore/cloud_firestore
41-
cloud_firestore_odm:
42-
path: ../../cloud_firestore_odm
43-
cloud_firestore_odm_generator:
44-
path: ../../cloud_firestore_odm_generator
45-
cloud_firestore_odm_generator_integration_test:
46-
path: ../../cloud_firestore_odm_generator/cloud_firestore_odm_generator_integration_test
47-
cloud_firestore_platform_interface:
48-
path: ../../../cloud_firestore/cloud_firestore_platform_interface
49-
cloud_firestore_web:
50-
path: ../../../cloud_firestore/cloud_firestore_web
51-
firebase_core:
52-
path: ../../../firebase_core/firebase_core
53-
firebase_core_platform_interface:
54-
path: ../../../firebase_core/firebase_core_platform_interface
55-
firebase_core_web:
56-
path: ../../../firebase_core/firebase_core_web
57-
5831
flutter:
5932
uses-material-design: true

packages/cloud_firestore_odm/cloud_firestore_odm_generator/cloud_firestore_odm_generator_integration_test/pubspec.yaml

+2-18
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ environment:
77

88
dependencies:
99
cloud_firestore: ^4.3.1
10-
cloud_firestore_odm:
11-
path: ../../cloud_firestore_odm
10+
cloud_firestore_odm: any
1211
flutter:
1312
sdk: flutter
1413
freezed_annotation: ^2.0.0
@@ -17,26 +16,11 @@ dependencies:
1716

1817
dev_dependencies:
1918
build_runner: ^2.0.0
20-
cloud_firestore_odm_generator:
21-
path: ../../cloud_firestore_odm_generator
19+
cloud_firestore_odm_generator: any
2220
flutter_test:
2321
sdk: flutter
2422
freezed: ^2.0.0
2523
json_serializable: ">=6.3.0 <7.0.0"
2624

27-
dependency_overrides:
28-
_flutterfire_internals:
29-
path: ../../../_flutterfire_internals
30-
cloud_firestore:
31-
path: ../../../cloud_firestore/cloud_firestore
32-
cloud_firestore_odm:
33-
path: ../../cloud_firestore_odm
34-
cloud_firestore_odm_generator:
35-
path: ../../cloud_firestore_odm_generator
36-
cloud_firestore_platform_interface:
37-
path: ../../../cloud_firestore/cloud_firestore_platform_interface
38-
cloud_firestore_web:
39-
path: ../../../cloud_firestore/cloud_firestore_web
40-
4125
flutter:
4226
uses-material-design: false

0 commit comments

Comments
 (0)