| // Copyright 2021 Google LLC |
| // |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file or at |
| // https://developers.google.com/open-source/licenses/bsd |
| |
| import 'utils.dart'; |
| |
| /// Specification of the pubspec.yaml for a generated package. |
| class Pubspec { |
| final String name; |
| final String? version; |
| final String description; |
| final String? author; |
| final String? repository; |
| final String? resolution; |
| |
| final Map<String, String> devDependencies; |
| |
| Pubspec( |
| this.name, |
| this.version, |
| this.description, { |
| this.author, |
| this.repository, |
| Map<String, String>? extraDevDependencies, |
| this.resolution, |
| }) : devDependencies = {..._defaultDevDependencies, ...?extraDevDependencies}; |
| |
| String get sdkConstraint => targetDartVersionConstraint; |
| |
| static const dependencies = { |
| 'http': '^1.0.0', |
| '_discoveryapis_commons': '^1.0.0', |
| }; |
| |
| static const _defaultDevDependencies = {'test': '^1.16.0'}; |
| } |