Skip to main content

Flutter quickstart

1. Create the policy​

npx moatgator init

init detects Flutter from pubspec.yaml and reads the Android applicationId from android/app/build.gradle(.kts).

2. Android​

flutter build appbundle --release
npx moatgator scan build/app/outputs/bundle/release/app-release.aab --min-grade C
npx moatgator protect build/app/outputs/bundle/release/app-release.aab --app-version 2.1.0

3. iOS​

flutter build ipa --release --export-options-plist=ExportOptions.plist
npx moatgator protect build/ios/ipa/MyApp.ipa --app-version 2.1.0

Notes​

  • Dart is compiled ahead of time, so there is no Dart source in the package. Obfuscate Dart symbols with --obfuscate --split-debug-info=<dir> in your own build; Moatgator does not replace that flag.
  • Signing stays yours.
  • Next: CI guides.