Skip to content

Quick start

From install to a build on your testers’ phones in about five minutes.

Dartlane is early. Today it:

  • builds Android APKs and app bundles with flutter build;
  • uploads them to Firebase App Distribution.

It does not build or distribute iOS, sign apps, or publish to the Play Store or App Store. iOS files (.ipa) can be uploaded to Firebase if you build them yourself, but Dartlane does not build them.

  • Dart 3.10 or newer and Flutter on your PATH. dartlane doctor checks both.
  • A Flutter app that builds with flutter build apk.
  • A Firebase project with App Distribution turned on, your Android app registered in it, and a tester group (for example qa).

The packages are not on pub.dev yet, so install from a checkout:

Terminal window
git clone https://github.com/AbhijithKonnayil/dartlane.git
dart pub global activate --source path dartlane/packages/dartlane

Check it works:

Terminal window
dartlane --version

From your Flutter app’s root:

Terminal window
dartlane init --local-repo /path/to/the/dartlane/checkout

(--local-repo is only needed until the packages are published.)

This creates a dartlane/ folder with lanes.dart, config.dart and its own pubspec.yaml, runs dart pub get, and adds .dartlane/ and .env to your .gitignore. Your app’s pubspec.yaml is not touched. Delete the folder to remove Dartlane.

Then check your setup:

Terminal window
dartlane doctor

init registers ready-made lanes. See them all with dartlane list.

Terminal window
dartlane run flutter_build_apk
dartlane run flutter_build_apk --flavor=prod --dart-define=ENV=prod

To see what a lane would do without doing it, add --dry-run.

Use either of these:

  • A service account (best for CI). Create one in Google Cloud with the Firebase App Distribution Admin role, download its JSON key, and set GOOGLE_APPLICATION_CREDENTIALS=/path/to/key.json in your shell or in .env. Never commit the key.
  • Your own login, on a laptop: gcloud auth application-default login.

Find your Firebase app ID (like 1:1234567890:android:abc123) under Project settings in the Firebase console, then:

Terminal window
dartlane run firebase_distribute \
--app=1:1234567890:android:abc123 \
--file=build/app/outputs/flutter-apk/app-release.apk \
--groups=qa \
--release-notes="First Dartlane release"

Testers in the group get an email. Without --groups or --testers the file is uploaded but nobody is notified, and Dartlane says so.

Typing both commands gets old. Add a lane to dartlane/lanes.dart:

'beta': Lane('Build and ship to QA', (ctx) async {
await ctx.run(const FlutterAnalyze());
final build = await ctx.run(FlutterBuild.apk(flavor: Config.flavor));
await ctx.run(
FirebaseDistribute(
build.path,
app: Config.firebaseAppId,
groups: ['qa'],
),
);
}),

Add static const firebaseAppId = '1:1234567890:android:abc123'; to dartlane/config.dart, then:

Terminal window
dartlane run beta --dry-run # preview
dartlane run beta # ship it