Contributor Setup

flutter_compile automates the setup of Flutter framework, engine, and DevTools contributor environments. This replaces the manual steps in the official Flutter wiki.

Overview

There are three contributor environments you can install:

EnvironmentCommandWhat It Sets Up
Flutter Frameworkinstall flutterClones flutter/flutter, sets up remotes
Engineinstall enginedepot_tools, gclient sync, engine repo
DevToolsinstall devtoolsClones flutter/devtools, sets up remotes
Note: The engine now builds from within the Flutter contributor checkout (monorepo alignment). You must run install flutter before install engine.

Install Flutter Framework

flutter_compile install flutter

This command will:

  1. Prompt you to choose SSH or HTTPS for git cloning
  2. Prompt for your GitHub username (for fork remote)
  3. Clone the Flutter framework repository
  4. Set up upstream (flutter/flutter) and origin (your fork) remotes
  5. Add the Flutter binary to your PATH via ~/.flutter_compile_env
  6. Save the path to ~/.flutter_compilerc

IDE flag

When called from an IDE extension, the --ide flag skips or auto-accepts IDE-specific prompts:

flutter_compile install flutter --ide vscode
flutter_compile install flutter --ide intellij

Install Engine

flutter_compile install engine

This command will:

  1. Verify Flutter is installed (required dependency)
  2. Install depot_tools if not already present
  3. Configure gclient with the engine repository
  4. Run gclient sync to fetch engine source
  5. Set up git remotes (upstream/origin)
  6. Save paths to ~/.flutter_compilerc

Platform flag

flutter_compile install engine --platform android
flutter_compile install engine --platform ios

Force sync

If gclient sync fails or you need a clean state:

flutter_compile install engine --force

This runs gclient sync --reset --force with automatic retry.

Install DevTools

flutter_compile install devtools

Clones the DevTools repository, sets up git remotes, and configures tracking branches.

Syncing With Upstream

Keep your contributor environments up to date:

# Sync all environments
flutter_compile sync

# Sync individually
flutter_compile sync flutter   # fetch upstream, rebase, update-packages
flutter_compile sync engine    # gclient sync, ninja build
flutter_compile sync devtools  # fetch upstream, rebase, pub get

For a forced engine sync (resets local changes):

flutter_compile sync engine --force

Verify Your Setup

Run doctor to check everything is configured correctly:

flutter_compile doctor

Doctor checks:

Uninstalling Environments

flutter_compile uninstall flutter
flutter_compile uninstall engine
flutter_compile uninstall devtools

Each uninstall command:

When uninstalling the engine, you'll be prompted whether to also remove depot_tools.

Default Installation Paths

ComponentDefault Path
Flutter Framework~/flutter_compile/flutter
Flutter Binary~/flutter_compile/flutter/bin/flutter
Engine Workspace~/flutter_compile/engine
DevTools~/flutter_compile/devtools
Depot Tools~/flutter_compile/depot_tools

Typical Contributor Workflow

# Initial setup (one-time)
flutter_compile install flutter
flutter_compile install engine
flutter_compile doctor

# Daily workflow
flutter_compile sync flutter
flutter_compile build engine
flutter_compile run -- -d macos

# Clean up builds
flutter_compile clean host_debug_unopt