Skip to content

Instantly share code, notes, and snippets.

@mraleph
Created October 8, 2019 19:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mraleph/b9291f2eba269d83c9d36f915643728b to your computer and use it in GitHub Desktop.
Save mraleph/b9291f2eba269d83c9d36f915643728b to your computer and use it in GitHub Desktop.
  1. Make a folder somewhere that will contain engine and framework checkouts. The rest of instructions assumes that $flt points to that folder.
  2. Into $flt/flutter get flutter by
    $ cd $flt
    $ git clone https://github.com/flutter/flutter
  3. Add $flt/flutter/bin to your path, run flutter doctor and fix issues if any are reported.
  4. Into $flt/engine get engine checkout following these instructions. Make sure to run dependency installation scripts as described there.
  5. In $flt/engine/src/third_party/dart switch to master and pull upto HEAD
    $ cd $flt/engine/src/third_party/dart
    $ git checkout master
    $ git pull --rebase    
  6. In $flt/engine/src do
    $ cd $flt/engine/src
    $ flutter/tools/gn --runtime-mode debug
    $ ninja -C out/host_debug
    $ flutter/tools/gn --runtime-mode release
    $ ninja -C out/host_release
    $ flutter/tools/gn --runtime-mode release --android-cpu arm64
    $ ninja -C out/android_release_arm64
  7. In $flt/flutter/examples/flutter_gallery run
    $ flutter build aot --target-platform android_arm64 --local-engine android_release_arm64 --extra-gen-snapshot-options=--print_snapshot_sizes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment