Clone goldens as part of flutter update-packages.

flutter_tools cannot depend on flutter_goldens (as flutter_goldens
depdends on the Flutter sdk), so this commit splits client.dart from
flutter_goldens to a pure-dart flutter_goldens_client package.
This commit is contained in:
Amir Hardon
2018-08-08 09:41:40 -07:00
committed by amirh
parent f4caa21c88
commit 592731f220
6 changed files with 18 additions and 2 deletions

View File

@@ -11,8 +11,8 @@ import 'package:file/local.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:meta/meta.dart';
import 'client.dart';
export 'client.dart';
import 'package:flutter_goldens_client/client.dart';
export 'package:flutter_goldens_client/client.dart';
/// Main method that can be used in a `flutter_test_config.dart` file to set
/// [goldenFileComparator] to an instance of [FlutterGoldenFileComparator] that

View File

@@ -13,6 +13,8 @@ dependencies:
meta: 1.1.6
platform: 2.2.0
process: 3.0.5
flutter_goldens_client:
path: ../flutter_goldens_client
analyzer: 0.32.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
args: 1.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"

View File

@@ -0,0 +1,4 @@
# Use the analysis options settings from the top level of the repo (not
# the ones from above, which include the `public_member_api_docs` rule).
include: ../../analysis_options.yaml

View File

@@ -6,6 +6,7 @@ import 'dart:async';
import 'dart:collection';
import 'package:meta/meta.dart';
import 'package:flutter_goldens_client/client.dart';
import '../base/common.dart';
import '../base/file_system.dart';
@@ -107,6 +108,13 @@ class UpdatePackagesCommand extends FlutterCommand {
final bool isPrintTransitiveClosure = argResults['transitive-closure'];
final bool isVerifyOnly = argResults['verify-only'];
// The dev/integration_tests/android_views integration test depends on an assets
// package that is in the goldens repository. We need to make sure that the goldens
// repository is cloned locally before we verify or update pubspecs.
printStatus('Cloning goldens repository...');
final GoldensClient goldensClient = new GoldensClient();
await goldensClient.prepare();
if (isVerifyOnly) {
bool needsUpdate = false;
printStatus('Verifying pubspecs...');

View File

@@ -36,6 +36,8 @@ dependencies:
web_socket_channel: 1.0.9
xml: 3.0.1
yaml: 2.1.15
flutter_goldens_client:
path: ../flutter_goldens_client
# We depend on very specific internal implementation details of the
# 'test' package, which change between versions, so when upgrading