Eliminate Dart 1 support in devicelab tests (#21240)
Flutter commands all default to --preview-dart-2. Eliminate support for the use of this option and the previewDart2 parameter in dev/devicelab tests.
This commit is contained in:
@@ -55,12 +55,6 @@ void main() async {
|
||||
}
|
||||
});
|
||||
|
||||
await runProjectTest((FlutterProject project) async {
|
||||
section('gradlew assembleDebug no-preview-dart-2');
|
||||
await project.runGradleTask('assembleDebug',
|
||||
options: <String>['-Ppreview-dart-2=false']);
|
||||
});
|
||||
|
||||
await runProjectTest((FlutterProject project) async {
|
||||
section('gradlew assembleProfile');
|
||||
await project.runGradleTask('assembleProfile');
|
||||
|
||||
@@ -20,7 +20,7 @@ TaskFunction createMicrobenchmarkTask() {
|
||||
final Device device = await devices.workingDevice;
|
||||
await device.unlock();
|
||||
|
||||
Future<Map<String, double>> _runMicrobench(String benchmarkPath, {bool previewDart2 = true}) async {
|
||||
Future<Map<String, double>> _runMicrobench(String benchmarkPath) async {
|
||||
Future<Map<String, double>> _run() async {
|
||||
print('Running $benchmarkPath');
|
||||
final Directory appDir = dir(
|
||||
@@ -35,10 +35,6 @@ TaskFunction createMicrobenchmarkTask() {
|
||||
'-d',
|
||||
device.deviceId,
|
||||
];
|
||||
if (previewDart2)
|
||||
options.add('--preview-dart-2');
|
||||
else
|
||||
options.add('--no-preview-dart-2');
|
||||
setLocalEngineOptionIfNecessary(options);
|
||||
options.add(benchmarkPath);
|
||||
return await _startFlutter(
|
||||
|
||||
@@ -194,7 +194,7 @@ class CompileTest {
|
||||
});
|
||||
}
|
||||
|
||||
static Future<Map<String, dynamic>> _compileAot({ bool previewDart2 = true }) async {
|
||||
static Future<Map<String, dynamic>> _compileAot() async {
|
||||
// Generate blobs instead of assembly.
|
||||
await flutter('clean');
|
||||
final Stopwatch watch = new Stopwatch()..start();
|
||||
@@ -214,10 +214,6 @@ class CompileTest {
|
||||
options.add('android-arm');
|
||||
break;
|
||||
}
|
||||
if (previewDart2)
|
||||
options.add('--preview-dart-2');
|
||||
else
|
||||
options.add('--no-preview-dart-2');
|
||||
setLocalEngineOptionIfNecessary(options);
|
||||
final String compileLog = await evalFlutter('build', options: options);
|
||||
watch.stop();
|
||||
@@ -235,15 +231,11 @@ class CompileTest {
|
||||
return metrics;
|
||||
}
|
||||
|
||||
static Future<Map<String, dynamic>> _compileApp({ bool previewDart2 = true, bool reportPackageContentSizes = false }) async {
|
||||
static Future<Map<String, dynamic>> _compileApp({ bool reportPackageContentSizes = false }) async {
|
||||
await flutter('clean');
|
||||
final Stopwatch watch = new Stopwatch();
|
||||
int releaseSizeInBytes;
|
||||
final List<String> options = <String>['--release'];
|
||||
if (previewDart2)
|
||||
options.add('--preview-dart-2');
|
||||
else
|
||||
options.add('--no-preview-dart-2');
|
||||
setLocalEngineOptionIfNecessary(options);
|
||||
final Map<String, dynamic> metrics = <String, dynamic>{};
|
||||
|
||||
@@ -287,14 +279,10 @@ class CompileTest {
|
||||
return metrics;
|
||||
}
|
||||
|
||||
static Future<Map<String, dynamic>> _compileDebug({ bool previewDart2 = true }) async {
|
||||
static Future<Map<String, dynamic>> _compileDebug() async {
|
||||
await flutter('clean');
|
||||
final Stopwatch watch = new Stopwatch();
|
||||
final List<String> options = <String>['--debug'];
|
||||
if (previewDart2)
|
||||
options.add('--preview-dart-2');
|
||||
else
|
||||
options.add('--no-preview-dart-2');
|
||||
setLocalEngineOptionIfNecessary(options);
|
||||
switch (deviceOperatingSystem) {
|
||||
case DeviceOperatingSystem.ios:
|
||||
|
||||
Reference in New Issue
Block a user