| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #library('pubspec'); | 5 #library('pubspec'); |
| 6 | 6 |
| 7 #import('package.dart'); | 7 #import('package.dart'); |
| 8 #import('source.dart'); | 8 #import('source.dart'); |
| 9 #import('source_registry.dart'); | 9 #import('source_registry.dart'); |
| 10 #import('utils.dart'); | 10 #import('utils.dart'); |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 source = sources[sourceName]; | 92 source = sources[sourceName]; |
| 93 description = spec[sourceName]; | 93 description = spec[sourceName]; |
| 94 } else { | 94 } else { |
| 95 throw new FormatException( | 95 throw new FormatException( |
| 96 'Dependency specification $spec must be a string or a mapping.'); | 96 'Dependency specification $spec must be a string or a mapping.'); |
| 97 } | 97 } |
| 98 | 98 |
| 99 source.validateDescription(description); | 99 source.validateDescription(description); |
| 100 | 100 |
| 101 dependencies.add(new PackageRef( | 101 dependencies.add(new PackageRef( |
| 102 name, source, versionConstraint, description)); | 102 source, versionConstraint, description)); |
| 103 }); | 103 }); |
| 104 } | 104 } |
| 105 | 105 |
| 106 return new Pubspec(version, dependencies); | 106 return new Pubspec(version, dependencies); |
| 107 } | 107 } |
| 108 } | 108 } |
| OLD | NEW |