diff --git a/engine/src/flutter/ci/analyze.sh b/engine/src/flutter/ci/analyze.sh index 5988f79b23c..abd8d9619e7 100755 --- a/engine/src/flutter/ci/analyze.sh +++ b/engine/src/flutter/ci/analyze.sh @@ -107,14 +107,12 @@ analyze \ "$FLUTTER_DIR/testing/smoke_test_failure" echo "Analyzing testing/dart..." -(cd "$FLUTTER_DIR/testing/dart" && "$PUB" get --offline) analyze \ --packages="$FLUTTER_DIR/testing/dart/.dart_tool/package_config.json" \ --options "$FLUTTER_DIR/analysis_options.yaml" \ "$FLUTTER_DIR/testing/dart" echo "Analyzing testing/scenario_app..." -(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/sky/packages/sky_engine/BUILD.gn b/engine/src/flutter/sky/packages/sky_engine/BUILD.gn index 3d244824763..89ff158dbcd 100644 --- a/engine/src/flutter/sky/packages/sky_engine/BUILD.gn +++ b/engine/src/flutter/sky/packages/sky_engine/BUILD.gn @@ -181,16 +181,48 @@ group("copy_dart_sdk") { ] } +generated_file("_embedder_yaml") { + outputs = [ "$root_gen_dir/dart-pkg/sky_engine/lib/_embedder.yaml" ] + contents = [ + "# This file is generated by //flutter/sky/packages/sky_engine:_embedder_yaml", + "# Do not modify this file directly. Instead, update the build file.", + "", + "embedded_libs:", + " \"dart:async\": \"async/async.dart\"", + " \"dart:collection\": \"collection/collection.dart\"", + " \"dart:convert\": \"convert/convert.dart\"", + " \"dart:core\": \"core/core.dart\"", + " \"dart:developer\": \"developer/developer.dart\"", + " \"dart:ffi\": \"ffi/ffi.dart\"", + " \"dart:html\": \"html/html_dart2js.dart\"", + " \"dart:io\": \"io/io.dart\"", + " \"dart:isolate\": \"isolate/isolate.dart\"", + " \"dart:js\": \"js/js.dart\"", + " \"dart:js_util\": \"js_util/js_util.dart\"", + " \"dart:math\": \"math/math.dart\"", + " \"dart:typed_data\": \"typed_data/typed_data.dart\"", + " \"dart:ui\": \"ui/ui.dart\"", + "", + " \"dart:_http\": \"_http/http.dart\"", + " \"dart:_interceptors\": \"_interceptors/interceptors.dart\"", + " # The _internal library is needed as some implementations bleed into the", + " # public API, e.g. List being Iterable by virtue of implementing", + " # EfficientLengthIterable. Not including this library yields analysis errors.", + " \"dart:_internal\": \"internal/internal.dart\"", + " \"dart:nativewrappers\": \"_empty.dart\"", + ] +} + dart_pkg("sky_engine") { sources = [ "LICENSE", "README.md", - "lib/_embedder.yaml", "lib/_empty.dart", "pubspec.yaml", ] deps = [ + ":_embedder_yaml", ":copy_dart_sdk", ":copy_dart_ui", ] diff --git a/engine/src/flutter/sky/packages/sky_engine/lib/_embedder.yaml b/engine/src/flutter/sky/packages/sky_engine/lib/_embedder.yaml index cb585dc09b2..c59d3623cd6 100644 --- a/engine/src/flutter/sky/packages/sky_engine/lib/_embedder.yaml +++ b/engine/src/flutter/sky/packages/sky_engine/lib/_embedder.yaml @@ -1,23 +1,26 @@ +# This file is suitable for use within the tree. A different _embedder.yaml +# is generated by the BUILD.gn in this directory. Changes here must be +# mirrored there. embedded_libs: - "dart:async": "async/async.dart" - "dart:collection": "collection/collection.dart" - "dart:convert": "convert/convert.dart" - "dart:core": "core/core.dart" - "dart:developer": "developer/developer.dart" - "dart:ffi": "ffi/ffi.dart" - "dart:html": "html/html_dart2js.dart" - "dart:io": "io/io.dart" - "dart:isolate": "isolate/isolate.dart" - "dart:js": "js/js.dart" - "dart:js_util": "js_util/js_util.dart" - "dart:math": "math/math.dart" - "dart:typed_data": "typed_data/typed_data.dart" - "dart:ui": "ui/ui.dart" + "dart:async": "../../../../../third_party/dart/sdk/lib/async/async.dart" + "dart:collection": "../../../../../third_party/dart/sdk/lib/collection/collection.dart" + "dart:convert": "../../../../../third_party/dart/sdk/lib/convert/convert.dart" + "dart:core": "../../../../../third_party/dart/sdk/lib/core/core.dart" + "dart:developer": "../../../../../third_party/dart/sdk/lib/developer/developer.dart" + "dart:ffi": "../../../../../third_party/dart/sdk/lib/ffi/ffi.dart" + "dart:html": "../../../../../third_party/dart/sdk/lib/html/html_dart2js.dart" + "dart:io": "../../../../../third_party/dart/sdk/lib/io/io.dart" + "dart:isolate": "../../../../../third_party/dart/sdk/lib/isolate/isolate.dart" + "dart:js": "../../../../../third_party/dart/sdk/lib/js/js.dart" + "dart:js_util": "../../../../../third_party/dart/sdk/lib/js_util/js_util.dart" + "dart:math": "../../../../../third_party/dart/sdk/lib/math/math.dart" + "dart:typed_data": "../../../../../third_party/dart/sdk/lib/typed_data/typed_data.dart" + "dart:ui": "../../../../lib/ui/ui.dart" - "dart:_http": "_http/http.dart" - "dart:_interceptors": "_interceptors/interceptors.dart" + "dart:_http": "../../../../../third_party/dart/sdk/lib/_http/http.dart" + "dart:_interceptors": "../../../../../third_party/dart/sdk/lib/_interceptors/interceptors.dart" # The _internal library is needed as some implementations bleed into the # public API, e.g. List being Iterable by virtue of implementing # EfficientLengthIterable. Not including this library yields analysis errors. - "dart:_internal": "internal/internal.dart" + "dart:_internal": "../../../../../third_party/dart/sdk/lib/internal/internal.dart" "dart:nativewrappers": "_empty.dart" diff --git a/engine/src/flutter/testing/dart/pubspec.yaml b/engine/src/flutter/testing/dart/pubspec.yaml index c6e0ae9d112..afa45beb1fd 100644 --- a/engine/src/flutter/testing/dart/pubspec.yaml +++ b/engine/src/flutter/testing/dart/pubspec.yaml @@ -19,6 +19,7 @@ environment: dependencies: litetest: any path: any + sky_engine: any vm_service: any dependency_overrides: @@ -35,8 +36,6 @@ dependency_overrides: spirv: path: ../../lib/spirv sky_engine: - path: ../../../out/host_debug_unopt/gen/dart-pkg/sky_engine - sky_services: - path: ../../../out/host_debug_unopt/gen/dart-pkg/sky_services + path: ../../sky/packages/sky_engine vm_service: path: ../../../third_party/dart/pkg/vm_service 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 6a369e08f7a..f1e52d3602e 100755 --- a/engine/src/flutter/testing/scenario_app/compile_android_aot.sh +++ b/engine/src/flutter/testing/scenario_app/compile_android_aot.sh @@ -45,12 +45,6 @@ if [[ ! -d "$DEVICE_TOOLS" ]]; then exit 1 fi -PUB="$HOST_TOOLS/dart-sdk/bin/pub" -PUB_VERSION="$("$PUB" --version)" -echo "Using Pub ${PUB_VERSION} from $PUB" - -(cd "$SCRIPT_DIR"; "$PUB" get --offline) - echo "Using dart from $HOST_TOOLS, gen_snapshot from $DEVICE_TOOLS." OUTDIR="$SCRIPT_DIR/build/android" 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 0b5de81ba96..360f6997db2 100755 --- a/engine/src/flutter/testing/scenario_app/compile_android_jit.sh +++ b/engine/src/flutter/testing/scenario_app/compile_android_jit.sh @@ -43,12 +43,6 @@ if [[ ! -d "$DEVICE_TOOLS" ]]; then exit 1 fi -PUB="$HOST_TOOLS/dart-sdk/bin/pub" -PUB_VERSION="$("$PUB" --version)" -echo "Using Pub $PUB_VERSION from $PUB" - -"$PUB" get --offline - echo "Using dart from $HOST_TOOLS, gen_snapshot from $DEVICE_TOOLS." OUTDIR="$SCRIPT_DIR/build/app" 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 59d7ffd48a2..5d565eef407 100755 --- a/engine/src/flutter/testing/scenario_app/compile_ios_aot.sh +++ b/engine/src/flutter/testing/scenario_app/compile_ios_aot.sh @@ -45,12 +45,6 @@ if [[ ! -d "$DEVICE_TOOLS" ]]; then exit 1 fi -PUB="$HOST_TOOLS/dart-sdk/bin/pub" -PUB_VERSION=$("$PUB" --version) -echo "Using Pub $PUB_VERSION from $PUB" - -"$PUB" get --offline - echo "Using dart from $HOST_TOOLS, gen_snapshot from $DEVICE_TOOLS." OUTDIR="$SCRIPT_DIR/build/ios" 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 bc48df00015..f43174e7140 100755 --- a/engine/src/flutter/testing/scenario_app/compile_ios_jit.sh +++ b/engine/src/flutter/testing/scenario_app/compile_ios_jit.sh @@ -45,12 +45,6 @@ if [[ ! -d "$DEVICE_TOOLS" ]]; then exit 1 fi -PUB="$HOST_TOOLS/dart-sdk/bin/pub" -PUB_VERSION=$("$PUB" --version) -echo "Using Pub $PUB_VERSION from $PUB" - -"$PUB" get --offline - echo "Using dart from $HOST_TOOLS, gen_snapshot from $DEVICE_TOOLS." OUTDIR="$SCRIPT_DIR/build/ios" diff --git a/engine/src/flutter/testing/scenario_app/pubspec.yaml b/engine/src/flutter/testing/scenario_app/pubspec.yaml index c8dfb79e583..7d7dc49f7a1 100644 --- a/engine/src/flutter/testing/scenario_app/pubspec.yaml +++ b/engine/src/flutter/testing/scenario_app/pubspec.yaml @@ -14,20 +14,14 @@ environment: # 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: 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 + path: ../../sky/packages/sky_engine vector_math: path: ../../../third_party/pkg/vector_math diff --git a/engine/src/flutter/tools/pub_get_offline.py b/engine/src/flutter/tools/pub_get_offline.py index 7d2a6f85a4c..5eb20b27806 100644 --- a/engine/src/flutter/tools/pub_get_offline.py +++ b/engine/src/flutter/tools/pub_get_offline.py @@ -18,7 +18,9 @@ ALL_PACKAGES = [ os.path.join("src", "flutter", "ci"), os.path.join("src", "flutter", "flutter_frontend_server"), os.path.join("src", "flutter", "testing", "benchmark"), + os.path.join("src", "flutter", "testing", "dart"), os.path.join("src", "flutter", "testing", "litetest"), + os.path.join("src", "flutter", "testing", "scenario_app"), os.path.join("src", "flutter", "testing", "smoke_test_failure"), os.path.join("src", "flutter", "testing", "symbols"), os.path.join("src", "flutter", "tools", "android_lint"),