diff --git a/DEPS b/DEPS index 46c229ddc0..70ee6343b6 100644 --- a/DEPS +++ b/DEPS @@ -88,6 +88,7 @@ vars = { 'dart_stack_trace_tag': '1.9.2', 'dart_stream_channel_tag': '1.6.4', 'dart_string_scanner_tag': '1.0.2', + 'dart_term_glyph_tag': '1.0.0', 'dart_test_tag': '0.12.38', 'dart_tuple_tag': 'v1.0.1', 'dart_typed_data_tag': '1.1.3', @@ -321,6 +322,9 @@ deps = { 'src/third_party/dart/third_party/pkg/typed_data': Var('dart_git') + '/typed_data.git' + '@' + Var('dart_typed_data_tag'), + 'src/third_party/dart/third_party/pkg/term_glyph': + Var('dart_git') + '/term_glyph.git' + '@' + Var('dart_term_glyph_tag'), + 'src/third_party/dart/third_party/pkg/test': Var('dart_git') + '/test.git' + '@' + Var('dart_test_tag'), @@ -418,29 +422,8 @@ hooks = [ { 'name': 'frontend_server_packages', 'pattern': '.', - 'condition': 'host_os == "linux"', 'cwd': 'src/flutter/frontend_server/', - 'action': [ - '../../../src/third_party/dart/tools/sdks/linux/dart-sdk/bin/pub', 'get', - ], - }, - { - 'name': 'frontend_server_packages', - 'pattern': '.', - 'condition': 'host_os == "mac"', - 'cwd': 'src/flutter/frontend_server/', - 'action': [ - '../../../src/third_party/dart/tools/sdks/mac/dart-sdk/bin/pub', 'get', - ], - }, - { - 'name': 'frontend_server_packages', - 'pattern': '.', - 'condition': 'host_os == "win"', - 'cwd': 'src/flutter/frontend_server/', - 'action': [ - '..\\..\\..\\src\\third_party\\dart\\tools\\sdks\\win\\dart-sdk\\bin\\pub.bat', 'get', - ], + 'action': ['python', '../tools/frontend_server_packages.py'], }, { # Ensure that we don't accidentally reference any .pyc files whose diff --git a/engine/src/flutter/frontend_server/pubspec.yaml b/engine/src/flutter/frontend_server/pubspec.yaml index ecf382f755..de6263ccd8 100644 --- a/engine/src/flutter/frontend_server/pubspec.yaml +++ b/engine/src/flutter/frontend_server/pubspec.yaml @@ -56,104 +56,3 @@ dev_dependencies: web_socket_channel: any when: any yaml: any - -dependency_overrides: - args: - path: ../../third_party/dart/third_party/pkg/args - async: - path: ../../third_party/dart/third_party/pkg/async - charcode: - path: ../../third_party/dart/third_party/pkg/charcode - collection: - path: ../../third_party/dart/third_party/pkg/collection - convert: - path: ../../third_party/dart/third_party/pkg/convert - crypto: - path: ../../third_party/dart/third_party/pkg/crypto - flutter_kernel_transformers: - path: ../flutter_kernel_transformers - front_end: - path: ../../third_party/dart/pkg/front_end/ - kernel: - path: ../../third_party/dart/pkg/kernel/ - logging: - path: ../../third_party/dart/third_party/pkg/logging - meta: - path: ../../third_party/dart/pkg/meta - quiver: - path: ../../third_party/dart/third_party/pkg/quiver - package_config: - path: ../../third_party/dart/third_party/pkg_tested/package_config - path: - path: ../../third_party/dart/third_party/pkg/path - source_span: - path: ../../third_party/dart/third_party/pkg/source_span - typed_data: - path: ../../third_party/dart/third_party/pkg/typed_data - usage: - path: ../../third_party/dart/third_party/pkg/usage - vm: - path: ../../third_party/dart/pkg/vm/ - - analyzer: - path: ../../third_party/dart/pkg/analyzer - boolean_selector: - path: ../../third_party/dart/third_party/pkg/boolean_selector - cli_util: - path: ../../third_party/dart/third_party/pkg/cli_util - csslib: - path: ../../third_party/dart/third_party/pkg/csslib - glob: - path: ../../third_party/dart/third_party/pkg/glob - html: - path: ../../third_party/dart/third_party/pkg/html - http: - path: ../../third_party/dart/third_party/pkg/http - http_multi_server: - path: ../../third_party/dart/third_party/pkg/http_multi_server - http_parser: - path: ../../third_party/dart/third_party/pkg/http_parser - matcher: - path: ../../third_party/dart/third_party/pkg/matcher - mime: - path: ../../third_party/dart/third_party/pkg/mime - mockito: - path: ../../third_party/dart/third_party/pkg/mockito - package_resolver: - path: ../../third_party/dart/third_party/pkg_tested/package_resolver - plugin: - path: ../../third_party/dart/third_party/pkg/plugin - pool: - path: ../../third_party/dart/third_party/pkg/pool - pub_semver: - path: ../../third_party/dart/third_party/pkg/pub_semver - shelf: - path: ../../third_party/dart/third_party/pkg/shelf - shelf_packages_handler: - path: ../../third_party/dart/third_party/pkg/shelf_packages_handler - shelf_static: - path: ../../third_party/dart/third_party/pkg/shelf_static - shelf_web_socket: - path: ../../third_party/dart/third_party/pkg/shelf_web_socket - source_map_stack_trace: - path: ../../third_party/dart/third_party/pkg/source_map_stack_trace - source_maps: - path: ../../third_party/dart/third_party/pkg/source_maps - stack_trace: - path: ../../third_party/dart/third_party/pkg/stack_trace - stream_channel: - path: ../../third_party/dart/third_party/pkg/stream_channel - string_scanner: - path: ../../third_party/dart/third_party/pkg/string_scanner - test: - path: ../../third_party/dart/third_party/pkg/test - utf: - path: ../../third_party/dart/third_party/pkg/utf - watcher: - path: ../../third_party/dart/third_party/pkg/watcher - web_socket_channel: - path: ../../third_party/dart/third_party/pkg/web_socket_channel - when: - path: ../../third_party/pkg/when - yaml: - path: ../../third_party/dart/third_party/pkg/yaml diff --git a/engine/src/flutter/tools/frontend_server_packages.py b/engine/src/flutter/tools/frontend_server_packages.py new file mode 100644 index 0000000000..1c2bbe28c5 --- /dev/null +++ b/engine/src/flutter/tools/frontend_server_packages.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python +# Copyright 2018 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. + +# This script generates .packages file for frontend server from +# Dart SDKs .packages file located in third_party/dart/.packages + +import os +import shutil + +DOT_PACKAGES = '.packages' +FRONTEND_SERVER_DIR = os.getcwd() +SRC_DIR = os.path.dirname(os.path.dirname(FRONTEND_SERVER_DIR)) +DART_PACKAGES_FILE = os.path.join(SRC_DIR, 'third_party', 'dart', DOT_PACKAGES) + +with open(DOT_PACKAGES, 'w') as packages: + with open(DART_PACKAGES_FILE, 'r') as dart_packages: + for line in dart_packages: + if line.startswith('#'): + packages.write(line) + else: + [package, path] = line.split(':', 1) + packages.write('%s:../../third_party/dart/%s' % (package, path)) + packages.write('frontend_server:./lib\n') + packages.write('flutter_kernel_transformers:../flutter_kernel_transformers/lib\n')