Skip to main content

Flutter Build for Android

The Flutter Build for Android step automates the generation of Android APK (Android Package) or AAB (Android App Bundle) files from Flutter source code using the Flutter SDK. This simplifies the process of creating distributable packages for Flutter applications.

Prerequisites

Before running the Flutter Build for Android step, you must complete certain prerequisites, as detailed in the table below:

Prerequisite Workflow StepDescription
Git CloneThis step fetches the repository that needs to be built from the specified branch. It is essential for initiating the Flutter Android build process.
Screenshot

Input Variables

This step contains some input variable(s). It needs these variable(s) to work. The table below gives explanation for this variable(s).

Screenshot
Variable NameDescriptionStatus
$AC_FLUTTER_PROJECT_DIRSpecifies the directory at the root of your Flutter project where the pubspec.yaml file is located.Required
$AC_OUTPUT_TYPEDefines the output type, such as APK or AAB (Android App Bundle).Required
$AC_FLUTTER_BUILD_MODESpecifies the Flutter build mode. The default value is release.Optional
$AC_FLUTTER_BUILD_EXTRA_ARGSAdditional custom build arguments. For instance: --split-per-abi.Optional
info

If the required variables are already defined in the Configuration section, there is no need to redefine them in the Workflow. For more details, see the Build Profile Configuration Overview. The details you provide in the configuration will serve as input for the Android Build step. Kindly substitute the example information with your details:

Screenshot

Output Variables

The output(s) resulting from the operation of this component are as follows:

Output VariableDescription
AC_APK_PATHPath of the generated APK file.
AC_AAB_PATHPath of the generated AAB file.
info

The resulting files will be either APK or AAB, based on the Output Type selected in the project Configuration.


To access the source code of this component, please use the following link:

Preview of GitHub - appcircleio/appcircle-android-flutter-build-component


FAQ

How can I solve the Out of memory error: Java heap memory or set the heap memory during the build?

To resolve this issue, please refer to the following document for detailed instructions: