mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00

Remove devicelab specific code for shutting down gradle daemon, add --android-gradle-daemon option to build/run/drive`. Avoids need for un-tested devicelab specific handler. There are also some feature requests for this, so 2 birds one stone. Example: flutter build apk --no-android-gradle-daemon will pass --no-daemon on to gradle
32 lines
968 B
Dart
32 lines
968 B
Dart
// Copyright 2014 The Flutter Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
import 'dart:io';
|
|
|
|
import '../framework/adb.dart';
|
|
import '../framework/task_result.dart';
|
|
import '../framework/utils.dart';
|
|
|
|
Future<TaskResult> runDartDefinesTask() async {
|
|
final Device device = await devices.workingDevice;
|
|
await device.unlock();
|
|
final String deviceId = device.deviceId;
|
|
final Directory testDirectory = dir('${flutterDirectory.path}/dev/integration_tests/ui');
|
|
await inDirectory<void>(testDirectory, () async {
|
|
await flutter('packages', options: <String>['get']);
|
|
|
|
await flutter('drive', options: <String>[
|
|
'--no-android-gradle-daemon',
|
|
'--verbose',
|
|
'-d',
|
|
deviceId,
|
|
'--dart-define=test.valueA=Example',
|
|
'--dart-define=test.valueB=Value',
|
|
'lib/defines.dart',
|
|
]);
|
|
});
|
|
|
|
return TaskResult.success(<String, dynamic>{});
|
|
}
|