diff --git a/pkg/dart2wasm/docs/flutter_hhh_builds.md b/pkg/dart2wasm/docs/flutter_hhh_builds.md index 8722b684583..5ffd0b265e4 100644 --- a/pkg/dart2wasm/docs/flutter_hhh_builds.md +++ b/pkg/dart2wasm/docs/flutter_hhh_builds.md @@ -67,7 +67,7 @@ their correct version using ``` Then checkout the Dart version we want. If the commit is available in the Dart -checkout from `/third_party/dart` then one may +checkout from `/flutter/third_party/dart` then one may ``` % vim flutter/DEPS @@ -80,13 +80,13 @@ checkout from `/third_party/dart` then one may but for local development one may just ``` - % cd third_party/dart -/third_party/dart % git checkout ... + % cd flutter/third_party/dart +/flutter/third_party/dart % git checkout ... ``` Now we have to make some modification to ensure that the build of the platform file doesn't use the downloaded prebuilt SDK but the one in -`/third_party/dart`, we do that by applying the following patch: +`/flutter/third_party/dart`, we do that by applying the following patch: ``` /flutter % git diff @@ -133,7 +133,7 @@ Build the normal Dart SDK in the same version as used in Flutter engine via `tools/build.py -mrelease create_sdk` NOTE: You can (after syncing dependencies with `gclient sync -D`) make -`/third_party/dart` a symlink to the normal Dart SDK you work on. That +`/flutter/third_party/dart` a symlink to the normal Dart SDK you work on. That avoids the need to keep the two in sync. ## Building a Flutter app (e.g. Wonderous) diff --git a/tools/3xhead_flutter_hooks.sh b/tools/3xhead_flutter_hooks.sh index 984a2dec41b..d7a86a75133 100755 --- a/tools/3xhead_flutter_hooks.sh +++ b/tools/3xhead_flutter_hooks.sh @@ -8,7 +8,7 @@ # latest dart sdk, run this script to apply workarounds to the source code. It # may patch up the source code so the three HEADs work together correctly. # -# Usage: src/third_party/dart/tools/3xhead_flutter_hooks.sh +# Usage: src/flutter/third_party/dart/tools/3xhead_flutter_hooks.sh # (run inside the root of a flutter engine checkout) set -e @@ -20,4 +20,4 @@ ensure_in_checkout_root # Copy changed dependencies from Dart DEPS to engine DEPS and update them in # checkout. -src/third_party/dart/tools/patches/flutter-engine/apply.sh +src/flutter/third_party/dart/tools/patches/flutter-engine/apply.sh diff --git a/tools/bots/flutter/compile_flutter.sh b/tools/bots/flutter/compile_flutter.sh index 4aaeb50891d..0ee171b1b89 100755 --- a/tools/bots/flutter/compile_flutter.sh +++ b/tools/bots/flutter/compile_flutter.sh @@ -58,12 +58,6 @@ git clone --single-branch -vv \ pushd flutter bin/flutter config --no-analytics -pinned_dart_sdk=$(cat bin/cache/dart-sdk/revision) -patch=$checkout/tools/patches/flutter-engine/${pinned_dart_sdk}.flutter.patch -if [ -e "$patch" ]; then - git apply $patch -fi - bin/flutter update-packages popd # flutter @@ -73,13 +67,15 @@ git clone --single-branch --depth=1 -vv \ pushd src git clone --single-branch --branch main --depth=1 -vv \ https://dart.googlesource.com/external/github.com/flutter/engine flutter +pushd flutter mkdir -p third_party pushd third_party ln -s $checkout dart popd # third_party +popd # flutter popd # src -./src/third_party/dart/tools/patches/flutter-engine/apply.sh || true +./src/flutter/third_party/dart/tools/patches/flutter-engine/apply.sh || true mkdir flutter_patched_sdk diff --git a/tools/patches/flutter-engine/apply.sh b/tools/patches/flutter-engine/apply.sh index 2964ad86757..9705dfd1678 100755 --- a/tools/patches/flutter-engine/apply.sh +++ b/tools/patches/flutter-engine/apply.sh @@ -7,7 +7,7 @@ # This script updates the flutter engine DEPS file with the # Dart SDK dependencies. # -# Usage: src/third_party/dart/tools/patches/flutter-engine/apply.sh +# Usage: src/flutter/third_party/dart/tools/patches/flutter-engine/apply.sh # (run inside the root of a flutter engine checkout) set -e @@ -40,7 +40,7 @@ if [ $need_runhooks = true ]; then # DEPS file might have been patched with new version of packages that # Dart SDK depends on. Get information about dependencies from the # DEPS file and forcefully update checkouts of those dependencies. - gclient revinfo --ignore-dep-type=cipd | grep 'src/third_party/dart/third_party' | while read -r line; do + gclient revinfo --ignore-dep-type=cipd | grep 'src/flutter/third_party/dart/third_party' | while read -r line; do # revinfo would produce lines in the following format: # path: git-url@tag-or-hash # Where no spaces occur inside path, git-url or tag-or-hash. diff --git a/tools/patches/utils.sh b/tools/patches/utils.sh index 681c707ed97..88da6c001fa 100644 --- a/tools/patches/utils.sh +++ b/tools/patches/utils.sh @@ -13,7 +13,7 @@ die() { ensure_in_checkout_root() { set -e - if [ ! -e src/third_party/dart ]; then + if [ ! -e src/flutter/third_party/dart ]; then die fi