Roll packages (#61034)

Roll packages, update XML deprecations.
This commit is contained in:
Dan Field
2020-07-07 16:40:33 -07:00
committed by GitHub
parent fb57edcc80
commit 33aa457604
55 changed files with 311 additions and 309 deletions

View File

@@ -6,7 +6,7 @@ import 'dart:async';
import 'package:crypto/crypto.dart';
import 'package:meta/meta.dart';
import 'package:xml/xml.dart' as xml;
import 'package:xml/xml.dart';
import '../artifacts.dart';
import '../base/common.dart';
@@ -963,10 +963,10 @@ String _getLocalArtifactVersion(String pomPath) {
if (!pomFile.existsSync()) {
throwToolExit("The file $pomPath wasn't found in the local engine out directory.");
}
xml.XmlDocument document;
XmlDocument document;
try {
document = xml.parse(pomFile.readAsStringSync());
} on xml.XmlParserException {
document = XmlDocument.parse(pomFile.readAsStringSync());
} on XmlParserException {
throwToolExit(
'Error parsing $pomPath. Please ensure that this is a valid XML document.'
);
@@ -975,9 +975,9 @@ String _getLocalArtifactVersion(String pomPath) {
'Error reading $pomPath. Please ensure that you have read permission to this '
'file and try again.');
}
final Iterable<xml.XmlElement> project = document.findElements('project');
final Iterable<XmlElement> project = document.findElements('project');
assert(project.isNotEmpty);
for (final xml.XmlElement versionElement in document.findAllElements('version')) {
for (final XmlElement versionElement in document.findAllElements('version')) {
if (versionElement.parent == project.first) {
return versionElement.text;
}