You may want to experiment with Fuchsia SDK changes in a Flutter component before submitting them to fuchsia.git, for example to validate a new UI API in the SDK with a Flutter component that uses that API.
This is a workflow for making local changes to the Fuchsia SDK and testing those changes in flutter-embedder.git.
Get a Fuchsia source checkout here.
Set up your Fuchsia build. For example for Workstation on emulator:
cd $FUCHSIA_DIR fx set workstation_eng.qemu-x64
Set $LOCAL_FUCHSIA_PLATFORM_BUILD
to your out directory for your Fuchsia build. For example:
export LOCAL_FUCHSIA_PLATFORM_BUILD=$FUCHSIA_DIR/out/default
Make your platform changes to the Fuchsia checkout that $LOCAL_FUCHSIA_PLATFORM_BUILD
points to.
Build Fuchsia and start the emulator.
cd $LOCAL_FUCHSIA_PLATFORM_BUILD
fx build
fx ffx emu start
Run an example using --with-fuchsia
to build the embedder against $LOCAL_FUCHSIA_PLATFORM_BUILD
's Fuchsia SDK.
$FUCHSIA_EMBEDDER_DIR/scripts/build_and_run_example.sh hello_flutter --with-fuchsia
See this guide for the full list of options that can be passed to build_and_run_example.sh
.
To iterate on changes ...
third_party/fuchsia/sdk
), you need to re-run steps 2 and 3.If you want to switch back to working with flutter-embedder's prebuilt Fuchsia SDK and Fuchsia images instead of the local one, run:
unset $LOCAL_FUCHSIA_PLATFORM_BUILD $FUCHSIA_EMBEDDER_DIR/tools/bazel sync --configure