Skip to content

Commit 26fb075

Browse files
authored
Move widget_preview_scaffold into pub workspace (flutter#185176)
This reverts commit e38a002. Fixes flutter#185161
1 parent 4a5dc26 commit 26fb075

5 files changed

Lines changed: 243 additions & 80 deletions

File tree

Lines changed: 16 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,33 @@
11
name: widget_preview_scaffold
22
description: Scaffolding for Flutter Widget Previews
3-
publish_to: "none"
4-
version: 0.0.1
53

64
environment:
75
sdk: ^3.10.0-0
86

7+
resolution: workspace
8+
99
dependencies:
1010
flutter:
1111
sdk: flutter
12-
flutter_test:
13-
sdk: flutter
14-
# These will be replaced with proper constraints after the template is hydrated.
15-
dtd: 4.0.0
16-
flutter_lints: 6.0.0
17-
google_fonts: 6.3.3
18-
json_rpc_2: 4.1.0
19-
path: 1.9.1
20-
stack_trace: 1.12.1
21-
url_launcher: 6.3.2
2212

23-
async: 2.13.1
24-
boolean_selector: 2.1.2
25-
characters: 1.4.1
26-
clock: 1.1.2
27-
collection: 1.19.1
28-
convert: 3.1.2
29-
crypto: 3.0.7
30-
fake_async: 1.3.3
31-
file: 7.0.1
32-
http: 1.6.0
33-
http_parser: 4.1.2
34-
leak_tracker: 11.0.2
35-
leak_tracker_flutter_testing: 3.0.10
36-
leak_tracker_testing: 3.0.2
37-
lints: 6.1.0
38-
matcher: 0.12.19
39-
material_color_utilities: 0.13.0
40-
meta: 1.18.0
41-
plugin_platform_interface: 2.1.8
42-
source_span: 1.10.2
43-
stream_channel: 2.1.4
44-
string_scanner: 1.4.1
45-
term_glyph: 1.2.2
46-
test_api: 0.7.11
47-
typed_data: 1.4.0
48-
unified_analytics: 8.0.14
49-
url_launcher_android: 6.3.29
50-
url_launcher_ios: 6.4.1
51-
url_launcher_linux: 3.2.2
52-
url_launcher_macos: 3.2.5
53-
url_launcher_platform_interface: 2.3.2
54-
url_launcher_web: 2.4.2
55-
url_launcher_windows: 3.1.5
56-
vector_math: 2.2.0
57-
vm_service: 15.0.2
58-
web: 1.1.1
59-
web_socket: 1.0.1
60-
web_socket_channel: 3.0.3
61-
webview_flutter: 4.9.0
62-
webview_flutter_web: ^0.2.3+4
13+
dtd: any
14+
file: any
15+
google_fonts: any
16+
json_rpc_2: any
17+
path: any
18+
stack_trace: any
19+
url_launcher: any
20+
web: any
21+
webview_flutter: any
6322

6423
dev_dependencies:
6524
flutter_tools:
6625
path: ../../../packages/flutter_tools/
67-
test: 1.31.0
26+
test: any
27+
flutter_test:
28+
sdk: flutter
6829

6930
flutter:
7031
uses-material-design: true
71-
# PUBSPEC CHECKSUM: ciq2fr
32+
33+
# PUBSPEC CHECKSUM: 7554df

packages/flutter_tools/lib/src/commands/update_packages.dart

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -172,14 +172,6 @@ class UpdatePackagesCommand extends FlutterCommand {
172172
rootDirectory.childDirectory('packages').childDirectory('flutter_tools'),
173173
);
174174

175-
// This package is intentionally not part of the workspace as it's a rehydrated template.
176-
final FlutterProject widgetPreviewScaffoldProject = FlutterProject.fromDirectory(
177-
rootProject.directory
178-
.childDirectory('dev')
179-
.childDirectory('integration_tests')
180-
.childDirectory('widget_preview_scaffold'),
181-
);
182-
183175
// This package is intentionally not part of the workspace to test
184176
// user-defines in its local pubspec.
185177
final Directory hooksUserDefineIntegrationTestDirectory = rootDirectory
@@ -214,16 +206,10 @@ class UpdatePackagesCommand extends FlutterCommand {
214206
final List<_ProjectDeps> toolDeps = await _upgrade(
215207
forceUpgrade: forceUpgrade,
216208
cherryPicks: cherryPicks,
217-
// Since the widget_preview_scaffold depends on the Flutter SDK and flutter_tools, we
218-
// need to make sure that flutter_tools uses the same versions for packages that are also
209+
// Ensure that flutter_tools uses the same versions for packages that are also
219210
// used by the Flutter SDK.
220211
pinned: deps.toVersions(),
221-
projects: [
222-
// The widget_preview_scaffold project has a path dependency on flutter_tools, so we must
223-
// upgrade the projects together.
224-
toolProject,
225-
widgetPreviewScaffoldProject,
226-
],
212+
projects: <FlutterProject>[toolProject],
227213
relaxToAny: relaxToAny,
228214
);
229215
for (final (:project, :deps) in toolDeps) {
@@ -245,7 +231,6 @@ class UpdatePackagesCommand extends FlutterCommand {
245231
// Manually do a pub get for packages not part of the workspace.
246232
// See https://github.com/flutter/flutter/pull/170364.
247233
await _pubGet(toolProject, false);
248-
await _pubGet(widgetPreviewScaffoldProject, false);
249234
await _pubGet(FlutterProject.fromDirectory(hooksUserDefineIntegrationTestDirectory), false);
250235

251236
await _downloadCoverageData();

packages/flutter_tools/test/commands.shard/hermetic/update_packages_test.dart

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -337,14 +337,6 @@ void main() {
337337
))
338338
.dependencies,
339339
);
340-
expect(
341-
pub.pubspecs[widgetPreviewScaffold.absolute.path]!.first.dependencies,
342-
(Pubspec.parse(kWidgetTestPubspecYaml)
343-
..dependencies['unified_analytics'] = HostedDependency(
344-
version: VersionConstraint.parse('8.0.10'),
345-
))
346-
.dependencies,
347-
);
348340
},
349341
overrides: <Type, Generator>{
350342
Pub: () => pub,

0 commit comments

Comments
 (0)