From bd5da72538dffbe163f009cb5c392f8562741277 Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Mon, 14 Feb 2022 21:23:59 +0000 Subject: [PATCH] [dartdev] tweak the pubspec file generation for 'dart create' Change-Id: I769ef258b9875aeeb23bc9aeca396bc9594197d4 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232980 Auto-Submit: Devon Carew Reviewed-by: Ben Konyi Commit-Queue: Ben Konyi --- pkg/dartdev/lib/src/templates/common.dart | 4 +--- pkg/dartdev/lib/src/templates/console_full.dart | 2 +- pkg/dartdev/lib/src/templates/console_simple.dart | 2 +- pkg/dartdev/lib/src/templates/package_simple.dart | 2 +- pkg/dartdev/lib/src/templates/server_shelf.dart | 2 +- pkg/dartdev/lib/src/templates/web_simple.dart | 2 +- 6 files changed, 6 insertions(+), 8 deletions(-) diff --git a/pkg/dartdev/lib/src/templates/common.dart b/pkg/dartdev/lib/src/templates/common.dart index ac537565a71..3c4a79c9c02 100644 --- a/pkg/dartdev/lib/src/templates/common.dart +++ b/pkg/dartdev/lib/src/templates/common.dart @@ -4,9 +4,7 @@ import '../sdk.dart'; -String get sdkConstraint => ''' - sdk: '>=${sdk.version} <3.0.0' -'''; +String get sdkConstraint => "sdk: '>=${sdk.version} <3.0.0'"; const String gitignore = ''' # Files and directories created by pub. diff --git a/pkg/dartdev/lib/src/templates/console_full.dart b/pkg/dartdev/lib/src/templates/console_full.dart index d4c2965c430..06583d93e74 100644 --- a/pkg/dartdev/lib/src/templates/console_full.dart +++ b/pkg/dartdev/lib/src/templates/console_full.dart @@ -38,7 +38,7 @@ version: 1.0.0 # homepage: https://www.example.com environment: -${common.sdkConstraint} + ${common.sdkConstraint} # dependencies: # path: ^1.8.0 diff --git a/pkg/dartdev/lib/src/templates/console_simple.dart b/pkg/dartdev/lib/src/templates/console_simple.dart index ed6f79373ed..0234d184845 100644 --- a/pkg/dartdev/lib/src/templates/console_simple.dart +++ b/pkg/dartdev/lib/src/templates/console_simple.dart @@ -36,7 +36,7 @@ version: 1.0.0 # homepage: https://www.example.com environment: -${common.sdkConstraint} + ${common.sdkConstraint} # dependencies: # path: ^1.8.0 diff --git a/pkg/dartdev/lib/src/templates/package_simple.dart b/pkg/dartdev/lib/src/templates/package_simple.dart index 9827dd7aeee..6bdbd575dc6 100644 --- a/pkg/dartdev/lib/src/templates/package_simple.dart +++ b/pkg/dartdev/lib/src/templates/package_simple.dart @@ -55,7 +55,7 @@ version: 1.0.0 # homepage: https://www.example.com environment: -${common.sdkConstraint} + ${common.sdkConstraint} # dependencies: # path: ^1.8.0 diff --git a/pkg/dartdev/lib/src/templates/server_shelf.dart b/pkg/dartdev/lib/src/templates/server_shelf.dart index c075f022df4..12a2e3b2c64 100644 --- a/pkg/dartdev/lib/src/templates/server_shelf.dart +++ b/pkg/dartdev/lib/src/templates/server_shelf.dart @@ -42,7 +42,7 @@ version: 1.0.0 # homepage: https://www.example.com environment: -${common.sdkConstraint} + ${common.sdkConstraint} dependencies: args: ^2.0.0 diff --git a/pkg/dartdev/lib/src/templates/web_simple.dart b/pkg/dartdev/lib/src/templates/web_simple.dart index e22be742bd4..04e87762021 100644 --- a/pkg/dartdev/lib/src/templates/web_simple.dart +++ b/pkg/dartdev/lib/src/templates/web_simple.dart @@ -42,7 +42,7 @@ version: 1.0.0 # homepage: https://www.example.com environment: -${common.sdkConstraint} + ${common.sdkConstraint} # dependencies: # path: ^1.7.0