Eliminate BuildInfo.previewDart2 (now always true) (#21392)

Dart 1 is no longer supported in Flutter.
This commit is contained in:
Chris Bracken
2018-09-04 13:38:17 -07:00
committed by GitHub
parent 5b5a5b8228
commit d04a057efd
10 changed files with 13 additions and 82 deletions

View File

@@ -285,10 +285,7 @@ Information about project "Runner":
when(mockArtifacts.getArtifactPath(Artifact.flutterFramework, TargetPlatform.ios, any)).thenReturn('engine');
when(mockArtifacts.engineOutPath).thenReturn(fs.path.join('out', 'ios_profile_arm'));
const BuildInfo buildInfo = BuildInfo(BuildMode.debug, null,
previewDart2: true,
targetPlatform: TargetPlatform.ios,
);
const BuildInfo buildInfo = BuildInfo(BuildMode.debug, null, targetPlatform: TargetPlatform.ios);
final FlutterProject project = await FlutterProject.fromPath('path/to/project');
await updateGeneratedXcodeProperties(
project: project,
@@ -306,11 +303,7 @@ Information about project "Runner":
testUsingOsxContext('sets TRACK_WIDGET_CREATION=true when trackWidgetCreation is true', () async {
when(mockArtifacts.getArtifactPath(Artifact.flutterFramework, TargetPlatform.ios, any)).thenReturn('engine');
when(mockArtifacts.engineOutPath).thenReturn(fs.path.join('out', 'ios_profile_arm'));
const BuildInfo buildInfo = BuildInfo(BuildMode.debug, null,
previewDart2: true,
trackWidgetCreation: true,
targetPlatform: TargetPlatform.ios,
);
const BuildInfo buildInfo = BuildInfo(BuildMode.debug, null, trackWidgetCreation: true, targetPlatform: TargetPlatform.ios);
final FlutterProject project = await FlutterProject.fromPath('path/to/project');
await updateGeneratedXcodeProperties(
project: project,
@@ -328,10 +321,7 @@ Information about project "Runner":
testUsingOsxContext('does not set TRACK_WIDGET_CREATION when trackWidgetCreation is false', () async {
when(mockArtifacts.getArtifactPath(Artifact.flutterFramework, TargetPlatform.ios, any)).thenReturn('engine');
when(mockArtifacts.engineOutPath).thenReturn(fs.path.join('out', 'ios_profile_arm'));
const BuildInfo buildInfo = BuildInfo(BuildMode.debug, null,
previewDart2: true,
targetPlatform: TargetPlatform.ios,
);
const BuildInfo buildInfo = BuildInfo(BuildMode.debug, null, targetPlatform: TargetPlatform.ios);
final FlutterProject project = await FlutterProject.fromPath('path/to/project');
await updateGeneratedXcodeProperties(
project: project,
@@ -349,10 +339,7 @@ Information about project "Runner":
testUsingOsxContext('sets ARCHS=armv7 when armv7 local engine is set', () async {
when(mockArtifacts.getArtifactPath(Artifact.flutterFramework, TargetPlatform.ios, any)).thenReturn('engine');
when(mockArtifacts.engineOutPath).thenReturn(fs.path.join('out', 'ios_profile'));
const BuildInfo buildInfo = BuildInfo(BuildMode.debug, null,
previewDart2: true,
targetPlatform: TargetPlatform.ios,
);
const BuildInfo buildInfo = BuildInfo(BuildMode.debug, null, targetPlatform: TargetPlatform.ios);
final FlutterProject project = await FlutterProject.fromPath('path/to/project');
await updateGeneratedXcodeProperties(

View File

@@ -140,8 +140,7 @@ void main() {
testUsingContext('not debug', () async {
final LaunchResult result = await device.startApp(null,
mainPath: mainPath,
debuggingOptions: new DebuggingOptions.disabled(
const BuildInfo(BuildMode.release, null, previewDart2: true)));
debuggingOptions: new DebuggingOptions.disabled(const BuildInfo(BuildMode.release, null)));
expect(result.started, isFalse);
}, overrides: startOverrides);
@@ -150,8 +149,7 @@ void main() {
expect(() async {
await device.startApp(null,
mainPath: mainPath,
debuggingOptions: new DebuggingOptions.disabled(
const BuildInfo(BuildMode.debug, null, previewDart2: true)));
debuggingOptions: new DebuggingOptions.disabled(const BuildInfo(BuildMode.debug, null)));
}, throwsToolExit());
}, overrides: startOverrides);
@@ -184,8 +182,7 @@ Hello!
final LaunchResult result = await device.startApp(null,
mainPath: mainPath,
debuggingOptions: new DebuggingOptions.enabled(
const BuildInfo(BuildMode.debug, null, previewDart2: true)));
debuggingOptions: new DebuggingOptions.enabled(const BuildInfo(BuildMode.debug, null)));
expect(result.started, isTrue);
expect(result.observatoryUri, observatoryUri);