Flutter

Configure buildtree build

{
  "buildtree": {
    "builds": {
      "ios": {
        "command": "flutter build ipa --export-method ad-hoc",
        "artifact": "build/ios/ipa/*.ipa"
      },
      "android": {
        "command": "flutter build apk --release",
        "artifact": "build/app/outputs/flutter-apk/app-release.apk"
      }
    }
  }
}
buildtree publish ios --env dev
buildtree publish android --env dev

iOS signing

flutter build ipa reads signing config from ios/Runner.xcodeproj. Configure the provisioning profile and team in Xcode, or pass an export options plist:

flutter build ipa --export-method ad-hoc --export-options-plist ios/export_options.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>method</key>
    <string>ad-hoc</string>
    <key>teamID</key>
    <string>YOUR_TEAM_ID</string>
</dict>
</plist>

Android signing

Configure android/key.properties with your keystore credentials and reference it from android/app/build.gradle. The Flutter signing docs cover this in detail.

For an app bundle:

flutter build appbundle --release
buildtree upload build/app/outputs/bundle/release/app-release.aab --env prod

.aab files install via Google Play only, not via direct download. Prefer .apk for QA testing.

Build flavors

{
  "buildtree": {
    "builds": {
      "ios": {
        "command": "flutter build ipa --flavor staging --export-method ad-hoc",
        "artifact": "build/ios/ipa/*.ipa"
      },
      "android": {
        "command": "flutter build apk --flavor staging --release",
        "artifact": "build/app/outputs/flutter-apk/staging/release/app-staging-release.apk"
      }
    }
  }
}
Flutter · Framework guide | buildtree docs