Unverified Commit cf37a472 authored by Chris Bracken's avatar Chris Bracken Committed by GitHub

Reorganise flutter driver implementation sources (#13163)

This patch reorganises flutter_driver's lib/src directory into three
subdirectories:

* driver: sources transitively imported/exported by flutter_driver.dart,
  which defines the API used by driver tests executed on the host machine.

* extension: sources transitively imported/exported by
  driver_extension.dart, which defines the API used to instrument a
  Flutter app running on the target device for use with a driver test.

* common: sources common to both driver and extension code.

This makes rolling Flutter into repositories that use Bazel (or
Bazel-like build systems) significantly more robust, due to the simpler
glob patterns involved.
parent d9bdb76f
......@@ -24,4 +24,4 @@
/// }
library flutter_driver_extension;
export 'src/extension.dart' show enableFlutterDriverExtension, DataHandler;
export 'src/extension/extension.dart' show enableFlutterDriverExtension, DataHandler;
......@@ -11,32 +11,32 @@
/// Protractor (Angular), Espresso (Android) or Earl Gray (iOS).
library flutter_driver;
export 'src/common.dart' show
testOutputsDirectory;
export 'src/driver.dart' show
find,
CommonFinders,
EvaluatorFunction,
FlutterDriver,
TimelineStream;
export 'src/error.dart' show
export 'src/common/error.dart' show
DriverError,
LogLevel,
LogRecord,
flutterDriverLog;
export 'src/find.dart' show
export 'src/common/find.dart' show
SerializableFinder;
export 'src/health.dart' show
export 'src/common/health.dart' show
Health,
HealthStatus;
export 'src/message.dart' show
export 'src/common/message.dart' show
Command,
Result;
export 'src/render_tree.dart' show
export 'src/common/render_tree.dart' show
RenderTree;
export 'src/timeline.dart' show
export 'src/driver/common.dart' show
testOutputsDirectory;
export 'src/driver/driver.dart' show
find,
CommonFinders,
EvaluatorFunction,
FlutterDriver,
TimelineStream;
export 'src/driver/timeline.dart' show
Timeline,
TimelineEvent;
export 'src/timeline_summary.dart' show
export 'src/driver/timeline_summary.dart' show
TimelineSummary,
kBuildBudget;
......@@ -14,16 +14,16 @@ import 'package:path/path.dart' as p;
import 'package:vm_service_client/vm_service_client.dart';
import 'package:web_socket_channel/io.dart';
import '../common/error.dart';
import '../common/find.dart';
import '../common/frame_sync.dart';
import '../common/gesture.dart';
import '../common/health.dart';
import '../common/message.dart';
import '../common/render_tree.dart';
import '../common/request_data.dart';
import '../common/semantics.dart';
import 'common.dart';
import 'error.dart';
import 'find.dart';
import 'frame_sync.dart';
import 'gesture.dart';
import 'health.dart';
import 'message.dart';
import 'render_tree.dart';
import 'request_data.dart';
import 'semantics.dart';
import 'timeline.dart';
/// Timeline stream identifier.
......
......@@ -15,15 +15,15 @@ import 'package:flutter/services.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_test/flutter_test.dart';
import 'error.dart';
import 'find.dart';
import 'frame_sync.dart';
import 'gesture.dart';
import 'health.dart';
import 'message.dart';
import 'render_tree.dart';
import 'request_data.dart';
import 'semantics.dart';
import '../common/error.dart';
import '../common/find.dart';
import '../common/frame_sync.dart';
import '../common/gesture.dart';
import '../common/health.dart';
import '../common/message.dart';
import '../common/render_tree.dart';
import '../common/request_data.dart';
import '../common/semantics.dart';
const String _extensionMethodName = 'driver';
const String _extensionMethod = 'ext.flutter.$_extensionMethodName';
......
......@@ -4,10 +4,10 @@
import 'dart:async';
import 'package:flutter_driver/src/driver.dart';
import 'package:flutter_driver/src/error.dart';
import 'package:flutter_driver/src/health.dart';
import 'package:flutter_driver/src/timeline.dart';
import 'package:flutter_driver/src/common/error.dart';
import 'package:flutter_driver/src/common/health.dart';
import 'package:flutter_driver/src/driver/driver.dart';
import 'package:flutter_driver/src/driver/timeline.dart';
import 'package:json_rpc_2/json_rpc_2.dart' as rpc;
import 'package:mockito/mockito.dart';
import 'package:test/test.dart';
......
......@@ -3,9 +3,9 @@
// found in the LICENSE file.
import 'package:flutter/scheduler.dart';
import 'package:flutter_driver/src/extension.dart';
import 'package:flutter_driver/src/find.dart';
import 'package:flutter_driver/src/request_data.dart';
import 'package:flutter_driver/src/common/find.dart';
import 'package:flutter_driver/src/common/request_data.dart';
import 'package:flutter_driver/src/extension/extension.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
......
......@@ -5,10 +5,10 @@
import 'dart:convert' show JSON;
import 'package:file/file.dart';
import 'package:flutter_driver/flutter_driver.dart';
import 'package:flutter_driver/src/driver/common.dart';
import 'package:path/path.dart' as path;
import 'package:test/test.dart';
import 'package:flutter_driver/src/common.dart';
import 'package:flutter_driver/flutter_driver.dart';
void main() {
group('TimelineSummary', () {
......
......@@ -3,7 +3,7 @@
// found in the LICENSE file.
import 'package:test/test.dart';
import 'package:flutter_driver/src/timeline.dart';
import 'package:flutter_driver/src/driver/timeline.dart';
void main() {
group('Timeline', () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment