File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ import 'package:yaml/yaml.dart';
10
10
11
11
import 'util.dart' ;
12
12
13
+ final _supportedBuildRunnerVersion = new VersionConstraint .parse ('^0.8.0' );
14
+
13
15
class PackageException implements Exception {
14
16
final List <PackageExceptionDetails > details;
15
17
@@ -32,7 +34,7 @@ class PackageExceptionDetails {
32
34
description: '''
33
35
# pubspec.yaml
34
36
dev_dependencies:
35
- build_runner: $supportedBuildRunnerVersionConstraint ''' );
37
+ build_runner: $_supportedBuildRunnerVersion ''' );
36
38
37
39
@override
38
40
String toString () => [error, description].join ('\n ' );
@@ -82,9 +84,9 @@ Future checkPubspecLock() async {
82
84
83
85
var version = buildRunner['version' ] as String ;
84
86
var buildRunnerVersion = new Version .parse (version);
85
- if (! supportedBuildRunnerVersionConstraint .allows (buildRunnerVersion)) {
87
+ if (! _supportedBuildRunnerVersion .allows (buildRunnerVersion)) {
86
88
var error = 'The `build_runner` version – $buildRunnerVersion – is not '
87
- 'within the allowed constraint – $supportedBuildRunnerVersionConstraint .' ;
89
+ 'within the allowed constraint – $_supportedBuildRunnerVersion .' ;
88
90
issues.add (new PackageExceptionDetails ._(error));
89
91
}
90
92
} else {
Original file line number Diff line number Diff line change 5
5
import 'dart:io' ;
6
6
7
7
import 'package:path/path.dart' as p;
8
- import 'package:pub_semver/pub_semver.dart' ;
9
8
10
9
const appName = 'webdev' ;
11
10
12
- final supportedBuildRunnerVersionConstraint =
13
- new VersionConstraint .parse ('^0.8.0' );
14
-
15
11
/// The path to the root directory of the SDK.
16
12
final String _sdkDir = (() {
17
13
// The Dart executable is in "/path/to/sdk/bin/dart", so two levels up is
You can’t perform that action at this time.
0 commit comments