Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update samples for Dart 3.2 #203

Merged
merged 3 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/dart.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Created with package:mono_repo v6.6.0
# Created with package:mono_repo v6.6.1
name: Dart CI
on:
push:
Expand Down Expand Up @@ -33,7 +33,7 @@ jobs:
name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: mono_repo self validate
run: dart pub global activate mono_repo 6.6.0
run: dart pub global activate mono_repo 6.6.1
- name: mono_repo self validate
run: dart pub global run mono_repo generate --validate
job_002:
Expand Down
8 changes: 4 additions & 4 deletions command_line/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
name: cli_app
description: >
description: >-
A command line application that can be compiled to native code using
dart compile exe.

# This example isn't intended for publishing on pub.dev.
publish_to: none

environment:
sdk: ^3.1.0
sdk: ^3.2.0

dependencies:
args: ^2.4.0
build_cli_annotations: ^2.1.0
github: ^9.17.0
github: ^9.19.0
intl: ^0.18.1

dev_dependencies:
build_cli: ^2.2.2
build_cli: ^2.2.3
build_runner: ^2.4.6
lints: ^3.0.0
test: ^1.24.0
Expand Down
2 changes: 1 addition & 1 deletion enhanced_enums/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: Samples that demonstrates the enhanced enums syntax
publish_to: none

environment:
sdk: ^3.1.0
sdk: ^3.2.0

dev_dependencies:
lints: ^3.0.0
Expand Down
4 changes: 2 additions & 2 deletions extension_methods/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: extension_methods
description: >
description: >-
A set of use cases for the extension methods feature.

# This example isn't intended for publishing on pub.dev.
publish_to: none

environment:
sdk: ^3.1.0
sdk: ^3.2.0

dev_dependencies:
lints: ^3.0.0
Expand Down
2 changes: 1 addition & 1 deletion ffi/hello_world/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: >-
publish_to: none

environment:
sdk: ^3.1.0
sdk: ^3.2.0

dependencies:
path: ^1.8.3
Expand Down
2 changes: 1 addition & 1 deletion ffi/primitives/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: A super simple example of calling C code from Dart with FFI
publish_to: none

environment:
sdk: ^3.1.0
sdk: ^3.2.0

dependencies:
ffi: ^2.1.0
Expand Down
2 changes: 1 addition & 1 deletion ffi/structs/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: >-
publish_to: none

environment:
sdk: ^3.1.0
sdk: ^3.2.0

dependencies:
ffi: ^2.1.0
Expand Down
2 changes: 1 addition & 1 deletion ffi/system-command/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: A FFI application that invokes system commands.
publish_to: none

environment:
sdk: ^3.1.0
sdk: ^3.2.0

dependencies:
ffi: ^2.1.0
Expand Down
2 changes: 1 addition & 1 deletion ffi/test_utils/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: test_utils
publish_to: none

environment:
sdk: ^3.1.0
sdk: ^3.2.0

dependencies:
path: ^1.8.3
Expand Down
2 changes: 1 addition & 1 deletion isolates/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: A sample command-line application.
publish_to: none

environment:
sdk: ^3.1.0
sdk: ^3.2.0

dependencies:
async: ^2.11.0
Expand Down
4 changes: 2 additions & 2 deletions native_app/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: native_app
description: >
description: >-
A command line application that can be compiled to native code using
dart compile exe.

# This example isn't intended for publishing on pub.dev.
publish_to: none

environment:
sdk: ^3.1.0
sdk: ^3.2.0

dev_dependencies:
lints: ^3.0.0
Expand Down
2 changes: 1 addition & 1 deletion null_safety/calculate_lix/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ version: 1.3.0
publish_to: none

environment:
sdk: ^3.1.0
sdk: ^3.2.0

dependencies:
collection: ^1.18.0
Expand Down
4 changes: 2 additions & 2 deletions package_constraint_solver/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ repository: https://github.com/dart-lang/samples/tree/main/package_constraint_so
publish_to: none

environment:
sdk: ^3.1.0
sdk: ^3.2.0

dependencies:
path: ^1.8.3

dev_dependencies:
checks: ^0.2.0
checks: ^0.2.2
lints: ^3.0.0
intl: ^0.18.1
test: ^1.24.0
2 changes: 1 addition & 1 deletion parameters/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ version: 1.0.0
publish_to: none

environment:
sdk: ^3.1.0
sdk: ^3.2.0

dev_dependencies:
lints: ^3.0.0
Expand Down
2 changes: 1 addition & 1 deletion server/google_apis/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: cloud_run_google_apis
publish_to: none # not intended for publication to pub.dev

environment:
sdk: ^3.1.0
sdk: ^3.2.0

dependencies:
google_cloud: ^0.2.0
Expand Down
2 changes: 1 addition & 1 deletion server/simple/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: container_server_example
publish_to: none # not intended for publication to pub.dev

environment:
sdk: ^3.1.0
sdk: ^3.2.0

dependencies:
shelf: ^1.4.0
Expand Down
18 changes: 7 additions & 11 deletions tool/ci.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/bin/bash
# Created with package:mono_repo v6.6.0
# Created with package:mono_repo v6.6.1

# Support built in commands on windows out of the box.

# When it is a flutter repo (check the pubspec.yaml for "sdk: flutter")
# then "flutter" is called instead of "pub".
# then "flutter pub" is called instead of "dart pub".
# This assumes that the Flutter SDK has been installed in a previous step.
function pub() {
if grep -Fq "sdk: flutter" "${PWD}/pubspec.yaml"; then
Expand All @@ -12,18 +13,13 @@ function pub() {
command dart pub "$@"
fi
}
# When it is a flutter repo (check the pubspec.yaml for "sdk: flutter")
# then "flutter" is called instead of "pub".
# This assumes that the Flutter SDK has been installed in a previous step.

function format() {
if grep -Fq "sdk: flutter" "${PWD}/pubspec.yaml"; then
command flutter format "$@"
else
command dart format "$@"
fi
command dart format "$@"
}

# When it is a flutter repo (check the pubspec.yaml for "sdk: flutter")
# then "flutter" is called instead of "pub".
# then "flutter analyze" is called instead of "dart analyze".
# This assumes that the Flutter SDK has been installed in a previous step.
function analyze() {
if grep -Fq "sdk: flutter" "${PWD}/pubspec.yaml"; then
Expand Down