Version projectVersion

Source

Version get projectVersion {
  if (_projectVersion == null) {
    var lockFile = new File.fromUri(projectDirectory.uri.resolve("pubspec.lock"));
    if (!lockFile.existsSync()) {
      throw new CLIException("No pubspec.lock file. Run `pub get`.");
    }

    Map<String, Map<String, dynamic>> lockFileContents = loadYaml(lockFile.readAsStringSync());
    String projectVersion = lockFileContents["packages"]["aqueduct"]["version"];
    _projectVersion = new Version.parse(projectVersion);
  }

  return _projectVersion;
}