Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci] Cumulative fixes to reopen the tree. #8344

Merged
merged 4 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@ void main() {
testWidgets(
'live stream duration != 0',
(WidgetTester tester) async {
// This test requires network access, and won't pass until a LUCI recipe
// change is made.
// TODO(camsim99): Remove once https://github.com/flutter/flutter/issues/160797 is fixed.
if (!kIsWeb && Platform.isAndroid) {
markTestSkipped(
'Skipping due to https://github.com/flutter/flutter/issues/160797');
return;
}

final VideoPlayerController networkController =
VideoPlayerController.networkUrl(
Uri.parse(
Expand Down Expand Up @@ -266,6 +275,15 @@ void main() {
testWidgets(
'reports buffering status',
(WidgetTester tester) async {
// This test requires network access, and won't pass until a LUCI recipe
// change is made.
// TODO(camsim99): Remove once https://github.com/flutter/flutter/issues/160797 is fixed.
if (!kIsWeb && Platform.isAndroid) {
markTestSkipped(
'Skipping due to https://github.com/flutter/flutter/issues/160797');
return;
}

await controller.initialize();
// Mute to allow playing without DOM interaction on Web.
// See https://developers.google.com/web/updates/2017/09/autoplay-policy-changes
Expand Down
4 changes: 2 additions & 2 deletions script/tool/lib/src/common/package_looping_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ abstract class PackageLoopingCommand extends PackageCommand {
if (minFlutterVersion != null) {
final Pubspec pubspec = package.parsePubspec();
final VersionConstraint? flutterConstraint =
pubspec.environment?['flutter'];
pubspec.environment['flutter'];
if (flutterConstraint != null &&
!flutterConstraint.allows(minFlutterVersion)) {
return PackageResult.skip(
Expand All @@ -350,7 +350,7 @@ abstract class PackageLoopingCommand extends PackageCommand {

if (minDartVersion != null) {
final Pubspec pubspec = package.parsePubspec();
final VersionConstraint? dartConstraint = pubspec.environment?['sdk'];
final VersionConstraint? dartConstraint = pubspec.environment['sdk'];
if (dartConstraint != null && !dartConstraint.allows(minDartVersion)) {
return PackageResult.skip('Does not support Dart $minDartVersion');
}
Expand Down
4 changes: 2 additions & 2 deletions script/tool/lib/src/create_all_packages_app_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ dependencies {}
final Pubspec originalPubspec = app.parsePubspec();
const String dartSdkKey = 'sdk';
final VersionConstraint dartSdkConstraint =
originalPubspec.environment?[dartSdkKey] ??
originalPubspec.environment[dartSdkKey] ??
VersionConstraint.compatibleWith(
Version.parse('3.0.0'),
);
Expand Down Expand Up @@ -342,7 +342,7 @@ publish_to: none

version: ${pubspec.version}

environment:${_pubspecMapString(pubspec.environment!)}
environment:${_pubspecMapString(pubspec.environment)}

dependencies:${_pubspecMapString(pubspec.dependencies)}

Expand Down
4 changes: 2 additions & 2 deletions script/tool/lib/src/pubspec_check_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -488,9 +488,9 @@ class PubspecCheckCommand extends PackageLoopingCommand {
}

final Version? dartConstraintMin =
_minimumForConstraint(pubspec.environment?['sdk']);
_minimumForConstraint(pubspec.environment['sdk']);
final Version? flutterConstraintMin =
_minimumForConstraint(pubspec.environment?['flutter']);
_minimumForConstraint(pubspec.environment['flutter']);

// Validate the Flutter constraint, if any.
if (flutterConstraintMin != null && minMinFlutterVersion != null) {
Expand Down
2 changes: 1 addition & 1 deletion script/tool/lib/src/update_min_sdk_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class UpdateMinSdkCommand extends PackageLoopingCommand {
/// Returns the given "environment" section's [key] constraint as a range,
/// if the key is present and has a range.
VersionRange? _sdkRange(Pubspec pubspec, String key) {
final VersionConstraint? constraint = pubspec.environment?[key];
final VersionConstraint? constraint = pubspec.environment[key];
if (constraint is VersionRange) {
return constraint;
}
Expand Down
2 changes: 1 addition & 1 deletion script/tool/test/create_all_packages_app_command_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ android {
final Pubspec generatedPubspec = command.app.parsePubspec();

const String dartSdkKey = 'sdk';
expect(generatedPubspec.environment?[dartSdkKey].toString(),
expect(generatedPubspec.environment[dartSdkKey].toString(),
existingSdkConstraint);
});

Expand Down
14 changes: 7 additions & 7 deletions script/tool/test/update_min_sdk_command_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ void main() {
]);

final String dartVersion =
package.parsePubspec().environment?['sdk'].toString() ?? '';
package.parsePubspec().environment['sdk'].toString();
expect(dartVersion, '^3.1.0');
});

Expand All @@ -65,7 +65,7 @@ void main() {
]);

final String dartVersion =
package.parsePubspec().environment?['sdk'].toString() ?? '';
package.parsePubspec().environment['sdk'].toString();
expect(dartVersion, '^3.1.0');
});

Expand All @@ -80,7 +80,7 @@ void main() {
]);

final String dartVersion =
package.parsePubspec().environment?['sdk'].toString() ?? '';
package.parsePubspec().environment['sdk'].toString();
expect(dartVersion, '^3.2.0');
});

Expand All @@ -98,9 +98,9 @@ void main() {
]);

final String dartVersion =
package.parsePubspec().environment?['sdk'].toString() ?? '';
package.parsePubspec().environment['sdk'].toString();
final String flutterVersion =
package.parsePubspec().environment?['flutter'].toString() ?? '';
package.parsePubspec().environment['flutter'].toString();
expect(dartVersion, '^3.1.0');
expect(flutterVersion, '>=3.13.0');
});
Expand All @@ -119,9 +119,9 @@ void main() {
]);

final String dartVersion =
package.parsePubspec().environment?['sdk'].toString() ?? '';
package.parsePubspec().environment['sdk'].toString();
final String flutterVersion =
package.parsePubspec().environment?['flutter'].toString() ?? '';
package.parsePubspec().environment['flutter'].toString();
expect(dartVersion, '^3.2.0');
expect(flutterVersion, '>=3.16.0');
});
Expand Down
Loading