Commit 592731f2 authored by Amir Hardon's avatar Amir Hardon Committed by amirh

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.
parent f4caa21c
...@@ -11,8 +11,8 @@ import 'package:file/local.dart'; ...@@ -11,8 +11,8 @@ import 'package:file/local.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import 'package:meta/meta.dart'; import 'package:meta/meta.dart';
import 'client.dart'; import 'package:flutter_goldens_client/client.dart';
export 'client.dart'; export 'package:flutter_goldens_client/client.dart';
/// Main method that can be used in a `flutter_test_config.dart` file to set /// Main method that can be used in a `flutter_test_config.dart` file to set
/// [goldenFileComparator] to an instance of [FlutterGoldenFileComparator] that /// [goldenFileComparator] to an instance of [FlutterGoldenFileComparator] that
......
...@@ -13,6 +13,8 @@ dependencies: ...@@ -13,6 +13,8 @@ dependencies:
meta: 1.1.6 meta: 1.1.6
platform: 2.2.0 platform: 2.2.0
process: 3.0.5 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" 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" args: 1.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
......
# 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
...@@ -6,6 +6,7 @@ import 'dart:async'; ...@@ -6,6 +6,7 @@ import 'dart:async';
import 'dart:collection'; import 'dart:collection';
import 'package:meta/meta.dart'; import 'package:meta/meta.dart';
import 'package:flutter_goldens_client/client.dart';
import '../base/common.dart'; import '../base/common.dart';
import '../base/file_system.dart'; import '../base/file_system.dart';
...@@ -107,6 +108,13 @@ class UpdatePackagesCommand extends FlutterCommand { ...@@ -107,6 +108,13 @@ class UpdatePackagesCommand extends FlutterCommand {
final bool isPrintTransitiveClosure = argResults['transitive-closure']; final bool isPrintTransitiveClosure = argResults['transitive-closure'];
final bool isVerifyOnly = argResults['verify-only']; 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) { if (isVerifyOnly) {
bool needsUpdate = false; bool needsUpdate = false;
printStatus('Verifying pubspecs...'); printStatus('Verifying pubspecs...');
......
...@@ -36,6 +36,8 @@ dependencies: ...@@ -36,6 +36,8 @@ dependencies:
web_socket_channel: 1.0.9 web_socket_channel: 1.0.9
xml: 3.0.1 xml: 3.0.1
yaml: 2.1.15 yaml: 2.1.15
flutter_goldens_client:
path: ../flutter_goldens_client
# We depend on very specific internal implementation details of the # We depend on very specific internal implementation details of the
# 'test' package, which change between versions, so when upgrading # 'test' package, which change between versions, so when upgrading
......
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