flutter_compile 0.19.12
flutter_compile: ^0.19.12 copied to clipboard
A CLI that automates Flutter framework, DevTools, and engine contributor environment setup — depot_tools, gclient sync, GN flags, and ninja builds.
CHANGE LOG #
0.19.12 #
- fix:
fcp codepush patch --buildon iOS was failing at the upload step withFormatException: Unexpected character (at line 2, character 1)because the Dart kernel payload (proper fix for the Mach-O bug in 0.19.11) is ~5× larger than the old (wrong) AOT Mach-O we used to ship, and the base64+JSON envelope pushed the POST body past Cloud Run's hard 32 MiB request body limit. The server was returning an HTTP 413 HTML error page, and the CLI was trying tojsonDecodethe<html>response and blowing up on the opening tag. CodePushClient.createPatchnow uses a new_postBinaryhelper: raw patch bytes in the request body,Content-Type: application/octet-stream,Content-Encoding: gzip, metadata (release_id, rollout_percentage, channel, signature, baseline_hash) in the query string. No base64, no JSON envelope. Gzip brings a 37 MiB Dart kernel down to ~11 MiB on the wire — comfortably under Cloud Run's 32 MiB limit with room for apps 2-3× larger. Pairs with the server-side handler added incode-push-server@04aee5f; older servers continue to work for the legacy JSON upload path if a CLI ever needs to downgrade (unlikely).- fix:
_parseResponseno longer throwsFormatExceptionwhen the server returns a non-JSON body. It now inspects the response'sContent-Typeheader (and sniffs the first character as a fallback), returns a structured{status_code, error, message}map with a 200-character excerpt of the body when the response isn't JSON, and never crashes on upstream error pages (Cloud Run 413, nginx 502, Google Frontend 5xx). HTTP 413 now surfaces asHTTP 413 (non-JSON response): Error: Request Entity Too Large. Your client issued a request that was too large.instead of a cryptic parse error.
0.19.11 #
- critical fix:
fcp codepush patch --build --platform ioswas packaging the wrong file.findSnapshotPath('ios')returnedRunner.app/Frameworks/App.framework/App— the baseline's AOT Mach-O binary — and fed it tofcp-tool packageas the patch payload. But iOS patches are interpreted bytecode (Apple's code-signing rules forbid loading unsigned native code at runtime), so the custom code-push engine expects a Dart kernel file (.dill), not the Mach-O baseline. Every iOS patch shipped via--buildwas aborting the Dart VM insideDN_Internal_loadDynamicModuleon the device.- Fix:
findSnapshotPath('ios')now returns the most recently modified.dart_tool/flutter_build/<hash>/app.dill— the Dart kernel written by thefcp-tool prepare iosstep. Android / Linux / macOS / Windows still return their ELF AOT snapshots as before. - Magic-byte pre-upload guard: new
CodePushBuildService.validatePayloadMagic(payload, platform)static helper inspects the first four bytes of the payload before it reachesfcp-tool package. iOS payloads must start with90 AB CD EF(Dart kernel magic); all other platforms must start with7F 45 4C 46(ELF magic). A Mach-O or wrong-platform payload now fails fast at upload time with an actionable error message, instead of silently producing a.fcppatchthat crashes every device that downloads it. The helper is public on the build service class so other tooling can reuse it (and is now covered by unit tests). - Pairs with
flutterplaza_code_push 0.1.8, which adds a defensive Mach-O rejection in the SDK's load path for devices stuck on older CLI versions.
- Fix:
0.19.10 #
- feat:
fcp codepush patch --buildnow computes a SHA-256 content hash of the freshly-builtApp.framework/App(iOS) orlibapp.so(Android) and passes it toPOST /api/v1/patchesas thebaseline_hashfield. The server records it per-patch and the SDK (flutterplaza_code_push 0.1.7+) compares it against the running baseline's hash before loading, refusing patches whose package-level Dart class layout doesn't match the device's baseline. Fixes a crash-loop scenario where a device running a baseline built against an older plugin version would download and try to load a patch built against a newer plugin version, aborting the Dart VM insideDN_Internal_loadDynamicModulebecause class offsets don't match. Seeflutterplaza_code_push0.1.7 CHANGELOG for the full explanation. - Best-effort: if the expected
App.framework/Appfile isn't found (e.g. unusual build layout),baseline_hashis omitted from the upload and the SDK falls back to its engine-ABI fingerprint check.
0.19.9 #
- docs: bundle the new Signing & Migration section in the
docs/code-push.htmlpage that ships with the package. Adds a version-keyed migration table (< 0.15.0, 0.15.0–0.19.7, 0.19.8+) with the exact commands for each cohort, expands the Security section to describe server-side signature verification + HTTP 403 rejection, adds rows forfcp codepush keys generate/registerto the CLI Commands table, and links out to the full guide at codepush.flutterplaza.com/docs#patch-signing. No code changes.
0.19.8 #
- security / feat: end-to-end RSA-SHA256 patch signature verification with an opt-in migration path for existing apps.
- New subcommand group
fcp codepush keyswithgenerateandregisteractions.fcp codepush keys generatecreates an RSA-2048 keypair under~/.flutter_codepush/and stores the private-key path in~/.flutter_compilerc. Idempotent unless--forceis passed. Fixes the "init was run on pre-0.15.0 and no key was ever generated" pain point that previously had no in-CLI recovery path.fcp codepush keys registeruploads the public key to the code push server for the current app viaPATCH /api/v1/apps, enabling mandatory server-side signature enforcement for every subsequent patch.
fcp codepush initnow generates the keypair before thePOST /api/v1/appscall and includes the public key in the create-app body, so new apps are secure by default (enforcement is on from the first patch).fcp codepush patchnow sends the computed RSA-SHA256 signature in thesignaturefield ofPOST /api/v1/patches.- When the server grandfathers an unsigned patch (app has no public key on file), the response includes a
signature_enforcementblock that the CLI surfaces as a loud migration banner directing the user to runfcp codepush keys register.
- New subcommand group
🛠 Migration guide for all existing users #
Pre-0.15.0 users (apps created before auto-keygen existed):
fcp codepush keys generate # generate local keypair
fcp codepush keys register # upload public key to server for your app
fcp codepush patch --build ... # signed from here on; server verifies
0.15.0–0.19.7 users (apps created with auto-keygen but no server registration):
fcp codepush keys register # local key already exists, just upload it
0.19.8+ new installs: no migration needed. fcp codepush init registers the public key automatically.
What happens if you do nothing? Your existing unsigned patches keep working. The server logs a warning per upload and the CLI prints a banner nudging you to register a key. Future releases will eventually remove the grandfather path — the warning will become the main signal that it's time to migrate.
0.19.7 #
- fix:
fcp codepush patch --buildandfcp codepush release --buildhard-failed at the finalize step on every project because both commands calledCodePushBuildService.finalizeBuildwithflutterVersion: nullhardcoded, and thereleasecommand's existing--flutter-versionoption was parsed but never actually wired through to the service. Adds a newCodePushBuildService.resolveFlutterVersion({explicit})helper with a three-step precedence: (1) the--flutter-versionCLI flag, (2)flutter --versionauto-detection, (3)codepush_engine_flutter_versionfrom~/.flutter_compilerc(written byfcp codepush setup). Thepatchcommand gains a--flutter-versionoption to matchrelease. The resolved value is now passed to bothprepareCodePushBuildandfinalizeBuild. If all three sources fail, the command exits with a clear error telling the user what to do. - feat:
CodePushBuildService.detectFlutterVersion()— runsflutter --version, parses the first line, returns the version string or null on any failure. - feat:
CodePushClient.getStoredEngineFlutterVersion()— readscodepush_engine_flutter_versionfrom~/.flutter_compilerc, mirroring the existinggetStoredToken/getAppIdaccessors.
0.19.6 #
- fix:
flutter_compile updatecould report "already at the latest version" while the very next command run (e.g.fcp --version) showed an "Update available!" banner pointing at a newer release, because the two version checks hit different pub.dev CDN edge nodes right after a publish. WrapsPubUpdater's HTTP client with a newPubCacheBustingClientthat appends a_cb=<microsecond-timestamp>query parameter andCache-Control: no-cache, no-store, max-age=0/Pragma: no-cacheheaders to every request, forcing every version lookup to be a cache miss at the edge. Bothupdate_command.run()andcommand_runner._checkForUpdates()go through the same sharedPubUpdaterinstance, so they now always agree. Fixes #17.
0.19.5 #
- fix:
fcp codepush patch --buildandfcp codepush release --buildprinted onlyFinalization failedwith zero detail when the finalize step failed, even under--verbose.CodePushBuildService.finalizeBuildreturned a barebooland discarded the subprocess stderr, exit code, and command line — the caller had nothing to report. Introduces aBuildStepResultstruct carryingsuccess,message,command,exitCode,stdout,stderr, and aformatDiagnostics()helper that prints a multi-line dump (exit code, elided command, stderr, stdout) right after the progress line. Both_codepush_patch.dartand_codepush_release.dartnow log these diagnostics on failure. The "tool not downloaded" precondition path now also returns an actionable message (Run "fcp codepush setup" first to download it.). Fixes #16.
0.19.4 #
- fix:
fcp codepush loginignored the server URL stored in~/.flutter_compilercand always tried to connect to the hardcoded dev defaulthttp://localhost:8090, so users saw a misleadingSocketException: Connection refused ... address = localhost, port = <random>on every attempt (the random port is Dart's local ephemeral source port, not the destination). Root cause wasargParser.addOption('server', defaultsTo: ...)which made the fallback unreachable. Now callsCodePushClient.getServerUrl()like every other codepush command. Fixes #15 (secondary symptom).
0.19.3 #
- fix:
lib/src/version.darthad been frozen at0.12.0since the v0.12.0 release, so every published version from 0.12.0 → 0.19.2 reported the wrong version fromfcp --versionand madefcp updaterun a no-op activate on every invocation (never marking the CLI as up-to-date). Bumps the constant and replaces the hardcodedensure_build_test.dartassertion with a dynamic pubspec-vs-version.dart comparison so future drift fails CI. Fixes #15.
0.19.2 #
- fix: drop the inaccurate "requires paid subscription" claim from the public README, from the
codepush/codepush release/codepush patchcommand descriptions shown infcp --help, and from thedocs/code-push.htmltable. Free tier supports productionreleaseandpatch; see the pricing page for plan limits. - fix:
releaseandpatchHTTP 403 error handlers now surface the server's actual error message instead of hardcoding "Paid subscription required".
0.19.1 #
- docs: add a Code Push section to the README with a link to codepush.flutterplaza.com/docs
- chore: apply
dart formatto two files that tripped the--set-exit-if-changedCI check (pure whitespace, no behavior change)
0.19.0 #
- security: patch signing is now enforced by default — pass
--unsignedto bypass - security: source uploads to the compile endpoint use RSA+AES hybrid encryption; server public key cached in
.flutter_compilerc - security:
fcp codepush initwritesFLTCodePushPublicKeytoInfo.plist - feat:
fcp codepush initgenerates native setup automatically —CodePushApp.kt,codepush.yaml,AndroidManifest.xml, andInfo.plist; flavored apps get manual integration instructions - feat:
fcp codepush release --buildandpatch --buildnow produce release-ready artifacts end to end (fixes #5) - feat: build steps are delegated to a private
fcp-toolbinary that the CLI downloads on first use - feat: Flutter SDK version auto-detected from
flutter --version --machine(with plain-text fallback) and sent onPOST /api/v1/releases— required for server-side patch compilation - feat:
fcp codepush versions --json— list supported/installed Flutter versions - feat:
fcp codepush account --jsonandcodepush status --jsonnow emit structured output (status supports--release-idfiltering andtotal_patches) - chore: remove internal implementation details from public code and docs
- chore: remove
fcp codepush seed-secrets— moved to the private admin CLI
0.18.0 #
- fix:
fcp codepush patch --buildnow usesflutter buildinstead of raw Dart kernel compiler — fixes dart:ui missing types - feat:
fcp codepush patch --platformflag to specify target platform - feat:
appbundleadded as supported platform for Android App Bundle builds
0.17.0 #
- feat:
fcp codepush register— browser OAuth flow, auto-creates account (alias for login) - feat:
fcp switchnow copies Dart SDK to contribution repo (fixes broken download) - feat: budget alerts UI in Console settings (threshold selector + save)
- feat:
--api-keyfallback on both register and login for headless/CI use
0.16.0 #
- feat:
fcp codepush login— browser-based authentication (no API key in terminal) - feat:
fcp codepush apps list— list all apps on your account - feat:
fcp codepush apps create— create a new app from CLI - feat:
fcp codepush billing usage— view plan, installs, and usage percentage - feat: 39 codepush subcommand tests (343 total)
0.15.0 #
- feat:
fcp codepush initnow generates RSA signing key pair automatically - feat:
fcp codepush patchauto-detects stored signing key — patches are signed by default - feat: warning displayed when patching without a signing key
- security: signing is now the default workflow, not opt-in
0.14.0 #
- feat:
fcp codepush patch --channel beta|production— deploy patches to specific channels for safer rollouts - feat:
fcp codepush setupnow ensures the Dart SDK is available in the contribution Flutter repo, fixing the corrupt download issue - fix:
fcp codepush release --buildno longer reports failure after a successful build - fix: improved APK snapshot path detection for different Gradle output layouts
- fix: improved error messages for missing tools
0.13.0 #
- feat:
fcp codepush seed-secretscommand — push .env secrets into GCP Secret Manager for server deployment - feat: multi-platform engine artifact support — Android, iOS, macOS, Linux, Windows build targets
- feat: platform-specific build artifact resolution for code push
- feat: cross-platform build artifact lookup with optional
platformparameter - fix: resolved all
dart analyzeerrors - fix: formatted all source files to pass
dart formatchecks
0.12.0 #
- feat:
FLUTTER_COMPILE_SDKenvironment variable — IDE terminals now use the project-pinned SDK instead of always falling back to the global default - feat: shell env file (
~/.flutter_compile_env) SDK block is now conditional: defers to IDE-provided SDK path when set, uses global default in regular terminals - feat: VS Code extension sets
FLUTTER_COMPILE_SDK+applyAtShellIntegrationso project-pinned SDKs survive shell init - feat: IntelliJ plugin sets
FLUTTER_COMPILE_SDKviaLocalTerminalCustomizerfor the same behavior - feat: auto-migration on extension/plugin activation — rewrites old env file SDK blocks with the new guarded template
- feat:
migratecommand rewrites SDK blocks withFLUTTER_COMPILE_SDKguard for existing CLI users - fix: SDK validation now checks for
bin/flutterinstead of.git/HEAD, so SDKs installed from release archives (no.git) work correctly - fix: whitespace-tolerant SDK path resolution — directories with trailing spaces are now matched via fallback scan
- fix:
sdk global,sdk use, andsdk removeall trim version names and use resolved paths - feat: VS Code & IntelliJ extensions v0.3.1
0.11.1 #
- fix: switch CI to GitHub-hosted runners (ubuntu-latest, windows-latest, macos-latest)
- fix: correct build matrix — replace duplicate macOS entry with Ubuntu for coverage uploads
- deps: upgrade
json_rpc_2to ^4.1.0 andlintsto ^6.1.0
0.11.0 #
- feat: engine now builds from within the Flutter contributor checkout (monorepo alignment with flutter/flutter)
- feat:
install enginerequiresinstall flutterfirst — engine lives inside the Flutter checkout - feat: add
--forceflag toinstall engineandsync enginefor forcedgclient syncwith automatic retry - feat:
build enginenow prepends depot_tools to PATH automatically (no manual PATH setup needed) - feat:
install flutter --ide vscode|intellijflag — skip or auto-accept IDE-specific prompts when called from extensions - feat:
doctornow probes known depot_tools locations for gclient beyond PATH - fix:
doctorstrips trailing/binfrom rc config paths for correct repo root detection - fix: idempotent git remote setup in
install flutter,install devtools, andinstall engine(safe to re-run) - fix:
install devtoolsnow saves path to rc config before modifying shell config - fix: gclient template updated for monorepo (
name: ".",{{flutter_url}}) - fix: engine upstream URLs changed from flutter/engine to flutter/flutter
- fix: better error messages and manual recovery instructions for gclient sync failures
- feat: VS Code extension v0.3.0 — dual SDK backend (Native + FVM), SDK Manager toggle button, doctor install actions
- feat: IntelliJ plugin v0.3.0 — mode dropdown for Native vs FVM backend, enhanced CLI integration
0.10.1 #
- fix: rc config read/write now splits on first colon only, fixing Windows drive-letter paths (e.g.
C:\Users\...) - fix: file watcher path matching now handles Windows backslash separators
- fix: add
TempHomeisolation tosdk execandsdk globaltests to prevent failures on machines with a configured SDK - fix: remove unused import in
sdk_exec_command_test.dart - fix: increase file watcher test timeouts for Windows CI reliability
- chore: add
.kotlin/to IntelliJ extension.gitignore - chore: add
.DS_Storeto root.gitignore
0.10.0 #
- feat: add
daemoncommand — JSON-RPC 2.0 daemon for real-time IDE communication over stdin/stdout - feat: daemon supports
sdk.list,sdk.global.get/set,sdk.use.get/set,doctor,config.list/get/set,status,version,shutdownmethods - feat: daemon sends
sdk.changedandconfig.changednotifications on file system changes - feat: add
uicommand — interactive terminal UI dashboard for SDK management - feat: TUI provides four tabs: SDKs (with install/set global), Environments, Builds, Doctor
- feat: TUI keyboard navigation with arrow keys, number keys for tab switching, and action keys
- feat: extract
gatherSdkList(),gatherDoctorChecks(),gatherStatus(),gatherConfig()helpers for daemon/TUI reuse - feat: add file watcher with 500ms debounce for
.flutter_compilercand.flutter-versionchanges - deps: add
json_rpc_2andstream_channeldependencies - test: add tests for daemon peer, file watcher, TUI key parser, TUI renderer, and new commands
- feat: add VS Code extension MVP (
extensions/vscode/) — status bar SDK version, quick pick switcher, Install SDK / Switch SDK / Doctor commands - feat: VS Code extension auto-updates
dart.flutterSdkPathworkspace setting on SDK switch - feat: VS Code extension watches
.flutter-versionfor external changes and updates status bar + settings automatically - feat: add
--forceflag tosdk installto remove and re-install an existing SDK - feat: add
isValidGitRepo()validation — detect and recover from partial/corrupted clones - feat: harden
cloneRepository()with force mode and partial clone cleanup on failure - feat:
isSdkInstalled()now validates.git/HEADinstead of just directory existence - feat: idempotent PATH management —
switch,uninstall, andsdk globaluse regex-based block detection to prevent duplicate entries - feat: add
homeDirOverridetoFclass for test isolation - feat: add shell completions documentation to README
- ci: expand GitHub Actions to matrix strategy (Ubuntu, Windows, macOS)
- test: add
TempHometest helper for isolated filesystem tests - test: add behavioral tests for
config,clean,status, andsdk installcommands - test: add unit tests for
Constants,ConsoleColorextension,isValidGitRepo,writeKeyValueToRcConfig,readGlobalSdkVersion - feat: add Android Studio / IntelliJ plugin MVP (
extensions/intellij/) — toolbar combo box SDK switcher, tool window with SDK list and doctor output - feat: IntelliJ plugin auto-updates Flutter SDK path in project settings on SDK switch via
FlutterSdkUtil - feat: IntelliJ plugin settings panel for configuring
flutter_compileCLI path
0.9.0 #
- feat: add
synccommand to sync contributor environments with upstream (sync flutter,sync engine,sync devtools) - feat: add
syalias forsynccommand - feat: bare
sync(no subcommand) runs all three environments sequentially - feat: add
fcpexecutable alias —fcpworks everywhereflutter_compiledoes - feat: add
--jsonflag tosdk list,doctor,config list, andstatusfor machine-readable output - feat: add Windows support — cross-platform PATH management, shell config detection, and host architecture resolution
- feat: add
F.homeDir()cross-platform helper (HOME on Unix, USERPROFILE on Windows) - feat:
isCommandAvailable()now useswhereon Windows,whichon Unix - feat:
getHostCpuArch()uses PROCESSOR_ARCHITECTURE env var on Windows - feat:
getShellConfigPath()returns PowerShell profile path on Windows - feat: add platform-aware PATH export templates for PowerShell
- feat:
doctornow checks for Visual Studio (cl.exe) on Windows - feat:
install flutterandinstall enginenow accept Windows as a supported platform - feat:
ducommands replaced with PowerShell equivalents on Windows forstatusandclean
0.8.0 #
- feat: add
sdk execcommand to run commands through the resolved SDK (project.flutter-version→ global default) - feat:
sdk installauto-sets global default when installing the first SDK - feat:
sdk removenow allows removing the global SDK and cleans up rc config and shell PATH block
0.7.0 #
- feat: add
sdk globalcommand to set or show the global default Flutter SDK version - feat: add
sdk usecommand to pin a Flutter SDK version per project (.flutter-version) - feat: PUB_CACHE isolation — each installed SDK uses its own
.pub-cachedirectory - feat:
sdk listnow annotates entries with(global)and(project)markers - feat:
sdk removenow guards against removing the global default or project-pinned SDK - feat: add SDK resolution helpers (
sdkPubCachePath,sdkEnvironment,sdkVersionPath,isSdkInstalled,readProjectSdkVersion,readGlobalSdkVersion,resolveActiveSdkVersion) - feat: add
environmentparameter toF.runCommand()andF.runFlutterCommand() - feat: add
global_sdkalias toconfigcommand
0.6.0 #
- feat: add
sdkcommand to install and manage multiple Flutter SDK versions (sdk install,sdk list,sdk remove) - feat: add
dralias fordoctorandupalias forupdate - refactor: replace all
exit()calls in shared utilities withFlutterCompileException - refactor: add centralized exception handling in command runner
- refactor: extract shell config detection to shared
F.getShellConfigPath()utility - refactor: replace
exit()calls with return exit codes in install/build commands - fix: rename
uninstall devtool→uninstall devtoolsfor consistency (old name kept as alias) - test: extract shared test helpers to reduce boilerplate across 12 test files
- test: add tests for exception handling,
sdkcommand,install,uninstall, andswitchcommands
0.5.1 #
- chore: upgrade mason_logger to ^0.3.3 and pub_updater to ^0.5.0
0.5.0 #
- feat: add
cleancommand to remove engine build output directories (alias:c) - feat: add
configcommand to view and modify.flutter_compilercfrom CLI (alias:cf) - fix:
uninstall flutternow removes PATH exports from shell config and cleans.flutter_compilerc
0.4.0 #
- feat: add
testcommand to run Flutter tests with a local engine build (--local-engine) - feat: add
statuscommand to show engine configuration and available builds - feat: add
talias fortestcommand andstalias forstatuscommand
0.3.1 #
- ci: add code coverage reporting and Codecov integration
- docs: update README badges (build, codecov, pub version, Dart SDK)
0.3.0 #
- feat: add
runcommand to launch Flutter apps with a local engine build (--local-engine) - feat: add
--gnand--no-gnflags tobuild enginefor incremental rebuilds (auto-skips GN whenbuild.ninjaexists) - feat: add
ralias forruncommand
0.2.0 #
- feat: automate Flutter engine setup (
install engine) — depot_tools, gclient sync, git remotes - feat: add
build enginecommand with GN flag resolution and ninja builds - feat: support all platforms — android, ios, macos, linux, web, host
- feat: extend
doctorwith depot_tools, ninja, Xcode, and engine environment checks - feat: implement
uninstall enginewith optional depot_tools cleanup - feat: add
workingDirectorysupport torunCommand(),getHostCpuArch(),writeFile()utilities
0.1.0 #
- feat: add
doctorcommand for environment health checks - feat: implement
uninstall devtoolwith PATH and config cleanup - fix: bug fixes and dead code cleanup
0.0.1 #
- Initial release
0.0.2 #
- Fix: broken links
0.0.2+1 #
- fix: tests
0.0.2+2 #
- fix: version index
- chore: update
0.0.3 #
- feat: (breaking) added support for compiling devTools