From 4ec2c5f244c6b87c1dc0eeebd9d12b4db01b1e19 Mon Sep 17 00:00:00 2001 From: John Ryan Date: Tue, 13 Aug 2024 11:38:43 -0700 Subject: [PATCH 1/3] Use pub workspace for the dart-pad monorepo --- .gitignore | 1 + pkgs/dart_services/pubspec.yaml | 7 +++---- pkgs/dartpad_shared/pubspec.yaml | 5 ++++- pkgs/dartpad_ui/pubspec.yaml | 7 +++---- pkgs/samples/pubspec.yaml | 5 ++++- pubspec.yaml | 8 ++++++++ 6 files changed, 23 insertions(+), 10 deletions(-) create mode 100644 pubspec.yaml diff --git a/.gitignore b/.gitignore index 6270ae4b6..042687136 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ build/ .buildlog .dart_tool/ .packages +pubspec.lock # Or the files created by dart2js. *.dart.js diff --git a/pkgs/dart_services/pubspec.yaml b/pkgs/dart_services/pubspec.yaml index d67718fa4..5ef27ca3d 100644 --- a/pkgs/dart_services/pubspec.yaml +++ b/pkgs/dart_services/pubspec.yaml @@ -3,7 +3,7 @@ description: The backend service for DartPad. publish_to: none environment: - sdk: ^3.4.0 + sdk: ^3.5.0 dependencies: analysis_server_lib: ^0.2.5 @@ -36,6 +36,5 @@ dev_dependencies: test: ^1.25.7 test_descriptor: ^2.0.1 -dependency_overrides: - dartpad_shared: - path: ../dartpad_shared +# This package is managed as part of the dart-pad workspace. +resolution: workspace \ No newline at end of file diff --git a/pkgs/dartpad_shared/pubspec.yaml b/pkgs/dartpad_shared/pubspec.yaml index cca44fc81..071350e96 100644 --- a/pkgs/dartpad_shared/pubspec.yaml +++ b/pkgs/dartpad_shared/pubspec.yaml @@ -3,7 +3,7 @@ description: Shared code between the DartPad frontend and backend. publish_to: none environment: - sdk: ^3.4.0 + sdk: ^3.5.0 dependencies: http: ^1.2.1 @@ -14,3 +14,6 @@ dev_dependencies: build_runner: ^2.4.11 dart_flutter_team_lints: ^3.1.0 json_serializable: ^6.8.0 + +# This package is managed as part of the dart-pad workspace. +resolution: workspace diff --git a/pkgs/dartpad_ui/pubspec.yaml b/pkgs/dartpad_ui/pubspec.yaml index 5ef36a4aa..0d6edf338 100644 --- a/pkgs/dartpad_ui/pubspec.yaml +++ b/pkgs/dartpad_ui/pubspec.yaml @@ -3,7 +3,7 @@ description: The front-end UI of DartPad. publish_to: none environment: - sdk: ^3.4.0 + sdk: ^3.5.0 dependencies: collection: any @@ -41,6 +41,5 @@ flutter: - assets/RobotoMono-Bold.ttf - assets/RobotoMono-Regular.ttf -dependency_overrides: - dartpad_shared: - path: ../dartpad_shared +# This package is managed as part of the dart-pad workspace. +resolution: workspace diff --git a/pkgs/samples/pubspec.yaml b/pkgs/samples/pubspec.yaml index 61a2e8306..6915daf0b 100644 --- a/pkgs/samples/pubspec.yaml +++ b/pkgs/samples/pubspec.yaml @@ -3,7 +3,7 @@ description: Sample code snippets for DartPad. publish_to: none environment: - sdk: ^3.4.0 + sdk: ^3.5.0 dependencies: flame: ^1.18.0 @@ -20,3 +20,6 @@ dev_dependencies: flutter: uses-material-design: true + +# This package is managed as part of the engine workspace. +resolution: workspace \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml new file mode 100644 index 000000000..071b9cbb8 --- /dev/null +++ b/pubspec.yaml @@ -0,0 +1,8 @@ +name: _dartpad_workspace +environment: + sdk: ^3.5.0 +workspace: + - pkgs/dart_services + - pkgs/dartpad_shared + - pkgs/dartpad_ui + - pkgs/samples From 3d671ea04e8bec7038ea476b7ff99c2028eb6673 Mon Sep 17 00:00:00 2001 From: John Ryan Date: Wed, 14 Aug 2024 13:44:29 -0700 Subject: [PATCH 2/3] Move resolution key above dependencies in pubspec.yaml files --- pkgs/dart_services/pubspec.yaml | 6 +++--- pkgs/dartpad_shared/pubspec.yaml | 5 +++-- pkgs/dartpad_ui/pubspec.yaml | 5 +++-- pkgs/samples/pubspec.yaml | 6 +++--- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/pkgs/dart_services/pubspec.yaml b/pkgs/dart_services/pubspec.yaml index 5ef27ca3d..0d5fa073d 100644 --- a/pkgs/dart_services/pubspec.yaml +++ b/pkgs/dart_services/pubspec.yaml @@ -5,6 +5,9 @@ publish_to: none environment: sdk: ^3.5.0 +# This package is managed as part of the dart-pad workspace. +resolution: workspace + dependencies: analysis_server_lib: ^0.2.5 analyzer: ^6.4.0 @@ -35,6 +38,3 @@ dev_dependencies: synchronized: ^3.1.0+1 test: ^1.25.7 test_descriptor: ^2.0.1 - -# This package is managed as part of the dart-pad workspace. -resolution: workspace \ No newline at end of file diff --git a/pkgs/dartpad_shared/pubspec.yaml b/pkgs/dartpad_shared/pubspec.yaml index 071350e96..71c1743f8 100644 --- a/pkgs/dartpad_shared/pubspec.yaml +++ b/pkgs/dartpad_shared/pubspec.yaml @@ -5,6 +5,9 @@ publish_to: none environment: sdk: ^3.5.0 +# This package is managed as part of the dart-pad workspace. +resolution: workspace + dependencies: http: ^1.2.1 json_annotation: ^4.9.0 @@ -15,5 +18,3 @@ dev_dependencies: dart_flutter_team_lints: ^3.1.0 json_serializable: ^6.8.0 -# This package is managed as part of the dart-pad workspace. -resolution: workspace diff --git a/pkgs/dartpad_ui/pubspec.yaml b/pkgs/dartpad_ui/pubspec.yaml index 0d6edf338..bac3fd0d6 100644 --- a/pkgs/dartpad_ui/pubspec.yaml +++ b/pkgs/dartpad_ui/pubspec.yaml @@ -5,6 +5,9 @@ publish_to: none environment: sdk: ^3.5.0 +# This package is managed as part of the dart-pad workspace. +resolution: workspace + dependencies: collection: any dartpad_shared: any @@ -41,5 +44,3 @@ flutter: - assets/RobotoMono-Bold.ttf - assets/RobotoMono-Regular.ttf -# This package is managed as part of the dart-pad workspace. -resolution: workspace diff --git a/pkgs/samples/pubspec.yaml b/pkgs/samples/pubspec.yaml index 6915daf0b..08f849c57 100644 --- a/pkgs/samples/pubspec.yaml +++ b/pkgs/samples/pubspec.yaml @@ -2,6 +2,9 @@ name: samples description: Sample code snippets for DartPad. publish_to: none +# This package is managed as part of the engine workspace. +resolution: workspace + environment: sdk: ^3.5.0 @@ -20,6 +23,3 @@ dev_dependencies: flutter: uses-material-design: true - -# This package is managed as part of the engine workspace. -resolution: workspace \ No newline at end of file From b1b7a84709c2c5ae240bc09c6eae0242630669a0 Mon Sep 17 00:00:00 2001 From: John Ryan Date: Wed, 14 Aug 2024 13:53:43 -0700 Subject: [PATCH 3/3] use Flutter action for all CI steps --- .github/workflows/dartpad_shared.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dartpad_shared.yml b/.github/workflows/dartpad_shared.yml index 112a382cc..2876cd975 100644 --- a/.github/workflows/dartpad_shared.yml +++ b/.github/workflows/dartpad_shared.yml @@ -25,7 +25,7 @@ jobs: steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 + - uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 - name: Install dart dependencies run: dart pub get