Skip to content

Commit

Permalink
Remove custom null safety analysis_options files (flutter#3339)
Browse files Browse the repository at this point in the history
  • Loading branch information
amirh authored and amantoux committed Feb 8, 2021
1 parent ecc9686 commit 4eb9978
Show file tree
Hide file tree
Showing 17 changed files with 11 additions and 135 deletions.
4 changes: 0 additions & 4 deletions packages/connectivity/connectivity/analysis_options.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion packages/connectivity/connectivity/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ flutter:
uses-material-design: true

environment:
sdk: ">=2.1.0 <3.0.0"
sdk: ">=2.12.0-0 <3.0.0"
flutter: ">=1.12.13+hotfix.5 <2.0.0"
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// TODO(amirh): Remove this once flutter_driver supports null safety.
// https://github.com/flutter/flutter/issues/71379
// @dart = 2.9

import 'dart:convert';
import 'dart:io';
import 'package:flutter_driver/flutter_driver.dart';
Expand Down

This file was deleted.

4 changes: 0 additions & 4 deletions packages/device_info/device_info/analysis_options.yaml

This file was deleted.

This file was deleted.

4 changes: 0 additions & 4 deletions packages/plugin_platform_interface/analysis_options.yaml

This file was deleted.

19 changes: 0 additions & 19 deletions packages/share/example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
12A149CFB1B2610A83692801 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -268,24 +267,6 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
12A149CFB1B2610A83692801 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
"${PODS_ROOT}/../Flutter/Flutter.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand Down
4 changes: 0 additions & 4 deletions packages/url_launcher/url_launcher/analysis_options.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion packages/url_launcher/url_launcher/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ flutter:
uses-material-design: true

environment:
sdk: ">=2.1.0 <3.0.0"
sdk: ">=2.12.0-0 <3.0.0"
flutter: ">=1.12.13+hotfix.5 <2.0.0"

This file was deleted.

4 changes: 0 additions & 4 deletions packages/video_player/video_player/analysis_options.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.


// TODO(amirh): Remove this once flutter_driver supports null safety.
// https://github.com/flutter/flutter/issues/71379
// @dart = 2.9
import 'dart:async';

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:integration_test/integration_test.dart';
import 'package:flutter_test/flutter_test.dart';
Expand All @@ -17,7 +16,7 @@ const Duration _playDuration = Duration(seconds: 1);

void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
late VideoPlayerController _controller;
VideoPlayerController _controller;
tearDown(() async => _controller.dispose());

group('asset videos', () {
Expand All @@ -35,58 +34,10 @@ void main() {
const Duration(seconds: 7, milliseconds: 540));
});

testWidgets(
'reports buffering status',
(WidgetTester tester) async {
VideoPlayerController networkController = VideoPlayerController.network(
'https://flutter.github.io/assets-for-api-docs/assets/videos/bee.mp4',
);
await networkController.initialize();
// Mute to allow playing without DOM interaction on Web.
// See https://developers.google.com/web/updates/2017/09/autoplay-policy-changes
await networkController.setVolume(0);
final Completer<void> started = Completer();
final Completer<void> ended = Completer();
bool startedBuffering = false;
bool endedBuffering = false;
networkController.addListener(() {
if (networkController.value.isBuffering && !startedBuffering) {
startedBuffering = true;
started.complete();
}
if (startedBuffering &&
!networkController.value.isBuffering &&
!endedBuffering) {
endedBuffering = true;
ended.complete();
}
});

await networkController.play();
await networkController.seekTo(const Duration(seconds: 5));
await tester.pumpAndSettle(_playDuration);
await networkController.pause();

expect(networkController.value.isPlaying, false);
expect(networkController.value.position,
(Duration position) => position > const Duration(seconds: 0));

await started;
expect(startedBuffering, true);

await ended;
expect(endedBuffering, true);
},
skip: !(kIsWeb || defaultTargetPlatform == TargetPlatform.android),
);

testWidgets(
'can be played',
(WidgetTester tester) async {
await _controller.initialize();
// Mute to allow playing without DOM interaction on Web.
// See https://developers.google.com/web/updates/2017/09/autoplay-policy-changes
await _controller.setVolume(0);

await _controller.play();
await tester.pumpAndSettle(_playDuration);
Expand All @@ -112,9 +63,6 @@ void main() {
'can be paused',
(WidgetTester tester) async {
await _controller.initialize();
// Mute to allow playing without DOM interaction on Web.
// See https://developers.google.com/web/updates/2017/09/autoplay-policy-changes
await _controller.setVolume(0);

// Play for a second, then pause, and then wait a second.
await _controller.play();
Expand Down Expand Up @@ -161,6 +109,6 @@ void main() {

await tester.pumpAndSettle();
expect(_controller.value.isPlaying, true);
}, skip: kIsWeb); // Web does not support local assets.
});
});
}
2 changes: 1 addition & 1 deletion packages/video_player/video_player/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ flutter:
- assets/bumble_bee_captions.srt

environment:
sdk: ">=2.8.0 <3.0.0"
sdk: ">=2.12.0-0 <3.0.0"
flutter: ">=1.12.13+hotfix.5 <2.0.0"

This file was deleted.

12 changes: 0 additions & 12 deletions packages/video_player/video_player_web/analysis_options.yaml

This file was deleted.

11 changes: 1 addition & 10 deletions script/incremental_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,8 @@ fi
#
# TODO(mklim): Remove everything from this list. https://github.com/flutter/flutter/issues/45440
CUSTOM_ANALYSIS_PLUGINS=(
"plugin_platform_interface"
"video_player/video_player"
"video_player/video_player_platform_interface"
"video_player/video_player_web"
"url_launcher/url_launcher_platform_interface"
"url_launcher/url_launcher"
"device_info/device_info_platform_interface"
"device_info/device_info"
"connectivity/connectivity_platform_interface"
"connectivity/connectivity"
)

# Comma-separated string of the list above
readonly CUSTOM_FLAG=$(IFS=, ; echo "${CUSTOM_ANALYSIS_PLUGINS[*]}")
# Set some default actions if run without arguments.
Expand Down

0 comments on commit 4eb9978

Please sign in to comment.