Building

July 18, 2026 · View on GitHub

English | 简体中文

Building invokes the build system used by the project and locates its raw artifacts. Build results can be used directly for testing and analysis, or passed to a packager to produce a distributable format.

Building vs. Packaging

OperationPrimary responsibilityCommon outputs
BuildCompile the project and locate raw artifactsAPK, AAB, IPA, .app, desktop bundle, web directory
PackageInvoke a builder, then prepare a distribution formatDMG, PKG, ZIP, or prepared APK, AAB, and IPA artifacts

If you only need the final distributable file, use fastforge package directly. The packaging process invokes the appropriate builder automatically, so you do not need to run fastforge build first.

Current Command Boundaries

Fastforge includes Gradle, Xcode, Flutter, and Custom builders, but they are exposed through the CLI in different ways:

BuilderCurrent entry pointStatus
Gradle Androidfastforge package, fastforge/package actionAPK and AAB are connected
Xcode iOS / macOSfastforge/package actionIPA and macOS .app are connected
Flutter Builderfastforge build; package for macOS onlyMultiple platforms connected
Gradle MultiplatformNo top-level commandBuild module only
Custom BuilderNo top-level commandBuild module only

Important

fastforge build is not currently a unified entry point for every builder. Do not use it to infer whether Gradle, Xcode, or Custom Builder is available; see the builder overview for the current status.

Run a Build Separately

The current top-level build command is:

fastforge build --platform <platform> [--target <target>]

For example:

fastforge build --platform android --target apk
fastforge build --platform web

--platform is required when the command runs, and some platforms also require --target. See Flutter Builder for supported platforms, targets, build arguments, artifact locations, and host restrictions.

Build Results

After a successful build, fastforge build writes JSON to standard output containing:

  • config: build mode and effective arguments
  • platform: target platform
  • outputDirectory: build output directory
  • outputFiles: detected artifact paths
  • duration: build duration in milliseconds

If the build command succeeds but no artifact is found in the expected directory, Fastforge still reports a failure. This prevents later packaging or publishing steps from using an empty directory.

Build During Packaging

Gradle and Xcode Builder are currently used mainly through package:

fastforge package --platform android --target apk

Xcode builds require arguments such as project and scheme. Pass them through a workflow action's build-args; see Xcode Builder for a complete example.

Next Steps