From 485954071d58e84778260bc5e7280882bad2861b Mon Sep 17 00:00:00 2001 From: Zachary Anderson Date: Thu, 20 May 2021 12:02:12 -0700 Subject: [PATCH] Use 'pub get --offline' for scenario_app deps (flutter/engine#26254) --- DEPS | 3 +++ engine/src/flutter/ci/analyze.sh | 2 +- .../flutter/ci/licenses_golden/tool_signature | 2 +- .../scenario_app/compile_android_aot.sh | 2 +- .../scenario_app/compile_android_jit.sh | 2 +- .../testing/scenario_app/compile_ios_aot.sh | 2 +- .../testing/scenario_app/compile_ios_jit.sh | 2 +- .../flutter/testing/scenario_app/pubspec.yaml | 25 +++++++++++++++---- .../src/flutter/tools/licenses/lib/main.dart | 1 + 9 files changed, 30 insertions(+), 11 deletions(-) diff --git a/DEPS b/DEPS index 1d0527668c..97b184291f 100644 --- a/DEPS +++ b/DEPS @@ -407,6 +407,9 @@ deps = { 'src/third_party/pkg/process': Var('github_git') + '/google/process.dart.git' + '@' + '0c9aeac86dcc4e3a6cf760b76fed507107e244d5', # 4.2.1 + 'src/third_party/pkg/vector_math': + Var('github_git') + '/google/vector_math.dart.git' + '@' + 'v2.1.0', + 'src/third_party/pkg/when': Var('dart_git') + '/when.git' + '@' + '0.2.0', diff --git a/engine/src/flutter/ci/analyze.sh b/engine/src/flutter/ci/analyze.sh index 65b277fe8a..37361fb061 100755 --- a/engine/src/flutter/ci/analyze.sh +++ b/engine/src/flutter/ci/analyze.sh @@ -98,7 +98,7 @@ analyze \ "$FLUTTER_DIR/testing/dart" echo "Analyzing testing/scenario_app..." -(cd "$FLUTTER_DIR/testing/scenario_app" && "$PUB" get) +(cd "$FLUTTER_DIR/testing/scenario_app" && "$PUB" get --offline) analyze \ --packages="$FLUTTER_DIR/testing/scenario_app/.dart_tool/package_config.json" \ --options "$FLUTTER_DIR/analysis_options.yaml" \ diff --git a/engine/src/flutter/ci/licenses_golden/tool_signature b/engine/src/flutter/ci/licenses_golden/tool_signature index d51c685424..8c4b2a3df4 100644 --- a/engine/src/flutter/ci/licenses_golden/tool_signature +++ b/engine/src/flutter/ci/licenses_golden/tool_signature @@ -1,2 +1,2 @@ -Signature: 469fde92656a4a5e122b7601271cf2cb +Signature: a62660b42e470ade57e05b076bff1222 diff --git a/engine/src/flutter/testing/scenario_app/compile_android_aot.sh b/engine/src/flutter/testing/scenario_app/compile_android_aot.sh index 01f1b039fc..6a369e08f7 100755 --- a/engine/src/flutter/testing/scenario_app/compile_android_aot.sh +++ b/engine/src/flutter/testing/scenario_app/compile_android_aot.sh @@ -49,7 +49,7 @@ PUB="$HOST_TOOLS/dart-sdk/bin/pub" PUB_VERSION="$("$PUB" --version)" echo "Using Pub ${PUB_VERSION} from $PUB" -(cd "$SCRIPT_DIR"; "$PUB" get) +(cd "$SCRIPT_DIR"; "$PUB" get --offline) echo "Using dart from $HOST_TOOLS, gen_snapshot from $DEVICE_TOOLS." diff --git a/engine/src/flutter/testing/scenario_app/compile_android_jit.sh b/engine/src/flutter/testing/scenario_app/compile_android_jit.sh index 01a7288e2e..f0da311776 100755 --- a/engine/src/flutter/testing/scenario_app/compile_android_jit.sh +++ b/engine/src/flutter/testing/scenario_app/compile_android_jit.sh @@ -47,7 +47,7 @@ PUB="$HOST_TOOLS/dart-sdk/bin/pub" PUB_VERSION="$("$PUB" --version)" echo "Using Pub $PUB_VERSION from $PUB" -"$PUB" get +"$PUB" get --offline echo "Using dart from $HOST_TOOLS, gen_snapshot from $DEVICE_TOOLS." diff --git a/engine/src/flutter/testing/scenario_app/compile_ios_aot.sh b/engine/src/flutter/testing/scenario_app/compile_ios_aot.sh index 06b5adc82f..59d7ffd48a 100755 --- a/engine/src/flutter/testing/scenario_app/compile_ios_aot.sh +++ b/engine/src/flutter/testing/scenario_app/compile_ios_aot.sh @@ -49,7 +49,7 @@ PUB="$HOST_TOOLS/dart-sdk/bin/pub" PUB_VERSION=$("$PUB" --version) echo "Using Pub $PUB_VERSION from $PUB" -"$PUB" get +"$PUB" get --offline echo "Using dart from $HOST_TOOLS, gen_snapshot from $DEVICE_TOOLS." diff --git a/engine/src/flutter/testing/scenario_app/compile_ios_jit.sh b/engine/src/flutter/testing/scenario_app/compile_ios_jit.sh index 9b2eb9a8bd..4d3799734c 100755 --- a/engine/src/flutter/testing/scenario_app/compile_ios_jit.sh +++ b/engine/src/flutter/testing/scenario_app/compile_ios_jit.sh @@ -49,7 +49,7 @@ PUB="$HOST_TOOLS/dart-sdk/bin/pub" PUB_VERSION=$("$PUB" --version) echo "Using Pub $PUB_VERSION from $PUB" -"$PUB" get +"$PUB" get --offline echo "Using dart from $HOST_TOOLS, gen_snapshot from $DEVICE_TOOLS." diff --git a/engine/src/flutter/testing/scenario_app/pubspec.yaml b/engine/src/flutter/testing/scenario_app/pubspec.yaml index 4cbf85e61a..c8dfb79e58 100644 --- a/engine/src/flutter/testing/scenario_app/pubspec.yaml +++ b/engine/src/flutter/testing/scenario_app/pubspec.yaml @@ -1,18 +1,33 @@ +# Copyright 2013 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. + name: scenario_app publish_to: none environment: sdk: '>=2.12.0-0 <3.0.0' +# Do not add any dependencies that require more than what is provided in +# //third_party/dart/pkg, //third_party/dart/third_party/pkg, or +# //third_party/pkg. In particular, package:test is not usable here. + +# If you do add packages here, make sure you can run `pub get --offline`, and +# check the .packages and .package_config to make sure all the paths are +# relative to this directory into //third_party/dart, or //third_party/pkg # These are for convenience during local development. Changing them will not # impact the build. dependencies: - sky_engine: - path: ../../../out/host_debug_unopt/gen/dart-pkg/sky_engine - sky_services: - path: ../../../out/host_debug_unopt/gen/dart-pkg/sky_services - vector_math: ^2.0.8 + sky_engine: any + sky_services: any + vector_math: any dependency_overrides: meta: path: ../../../third_party/dart/pkg/meta + sky_engine: + path: ../../../out/host_debug_unopt/gen/dart-pkg/sky_engine + sky_services: + path: ../../../out/host_debug_unopt/gen/dart-pkg/sky_services + vector_math: + path: ../../../third_party/pkg/vector_math diff --git a/engine/src/flutter/tools/licenses/lib/main.dart b/engine/src/flutter/tools/licenses/lib/main.dart index 525e0092c7..854af19d41 100644 --- a/engine/src/flutter/tools/licenses/lib/main.dart +++ b/engine/src/flutter/tools/licenses/lib/main.dart @@ -1670,6 +1670,7 @@ class _RepositoryPkgDirectory extends _RepositoryDirectory { && entry.name != 'petitparser' && entry.name != 'platform' && entry.name != 'process' + && entry.name != 'vector_math' && entry.name != 'xml'; }