Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Building a flutter application

Martin Kustermann edited this page Nov 29, 2016 · 22 revisions

Get the source checkouts

Get a flutter checkout

Please follow the instructions at flutter/flutter/CONTRIBUTING.md.

Afterwards apply cl/2541483002.

When editing the flutter_tools sources one needs to clear the cached snapshots:

rm bin/cache/flutter_tools.s*

Get a flutter-engine checkout

Please follow the instructions at flutter/engine/CONTRIBUTING.md

Afterwards cd to the flutter subdirectory and apply cl/2533293002 and run gclient sync.

Build the local flutter engine

Please follow the instructions at flutter/engine/CONTRIBUTING.md to build android_release configuration.

It might be necessary to also build the generate_patched_sdk target with ninja.

Build the flutter app

flutter/examples/flutter_gallery $ ../../bin/flutter --local-engine-src-path=<path-to-flutter-engine-src> --local-engine=android_release -v build apk

Dump type inferred type information

flutter/examples/flutter_gallery $ <path-to-flutter-engine-checkout>/src/dart/third_party/kernel/bin/dump.dart lib/main.transformed.inferred.dill lib/main.transformed.inferred.dill.txt
flutter/examples/flutter_gallery $ vim lib/main.transformed.inferred.dill.txt