Skip to content

Commit 078000a

Browse files
committed
Move support build runner version around
1 parent cd2559b commit 078000a

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

webdev/lib/src/pubspec.dart

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import 'package:yaml/yaml.dart';
1010

1111
import 'util.dart';
1212

13+
final _supportedBuildRunnerVersion = new VersionConstraint.parse('^0.8.0');
14+
1315
class PackageException implements Exception {
1416
final List<PackageExceptionDetails> details;
1517

@@ -32,7 +34,7 @@ class PackageExceptionDetails {
3234
description: '''
3335
# pubspec.yaml
3436
dev_dependencies:
35-
build_runner: $supportedBuildRunnerVersionConstraint''');
37+
build_runner: $_supportedBuildRunnerVersion''');
3638

3739
@override
3840
String toString() => [error, description].join('\n');
@@ -82,9 +84,9 @@ Future checkPubspecLock() async {
8284

8385
var version = buildRunner['version'] as String;
8486
var buildRunnerVersion = new Version.parse(version);
85-
if (!supportedBuildRunnerVersionConstraint.allows(buildRunnerVersion)) {
87+
if (!_supportedBuildRunnerVersion.allows(buildRunnerVersion)) {
8688
var error = 'The `build_runner` version – $buildRunnerVersion – is not '
87-
'within the allowed constraint – $supportedBuildRunnerVersionConstraint.';
89+
'within the allowed constraint – $_supportedBuildRunnerVersion.';
8890
issues.add(new PackageExceptionDetails._(error));
8991
}
9092
} else {

webdev/lib/src/util.dart

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,9 @@
55
import 'dart:io';
66

77
import 'package:path/path.dart' as p;
8-
import 'package:pub_semver/pub_semver.dart';
98

109
const appName = 'webdev';
1110

12-
final supportedBuildRunnerVersionConstraint =
13-
new VersionConstraint.parse('^0.8.0');
14-
1511
/// The path to the root directory of the SDK.
1612
final String _sdkDir = (() {
1713
// The Dart executable is in "/path/to/sdk/bin/dart", so two levels up is

0 commit comments

Comments
 (0)