As I'm not using Microsoft tools anymore I won't maintain this repository in the future. If someone wants the repository ownership please contact me on X.
Flutter build task for Azure DevOps.
Installation can be done using Visual Studio MarketPlace.
Source code can be found on Github.
Add the tasks to your build definition.
Installs the Flutter SDK onto the running agent if not already installed. Then uses it for following tasks.
channel
: stable (default)
, beta
, or dev
.version
of the SDK to install: latest (default)
, custom
. If custom
is specified, a custom version
must be set.custom version
(in a <M>.<m>.<p>
semver format) if needed.Build the given mobile application project. You must call the Flutter Install
task, set a FlutterToolPath
environment variable, or use the optional Flutter SDK Path task entry that points to your flutter/bin
folder before execution. All the application bundles are created into the build/outputs
folder of your project.
project source directory
(that contains to pubspec.yaml
file).target
platform: Android (default)
, iOS
, or All
for both.flutter sdk path
if using a local agent with a pre-installed Flutter SDK, can specify the path to utilize it. Otherwise use Flutter Install.package name
(like 1.2.3
) that will override the manifest's one.package number
(like 12
) that will override the manifest's one.build flavour
(like development
) to specify a build flavour. Must match Android Gradle flavor definition or XCode scheme.debug
if you wish to override the default release mode for the build.Additional arguments
if you wish to adds custom arguments to the build
command.platform
for the Android target: android-arm (default)
, android-arm64
.platform
for the iOS target: device (default)
, simulator
.Install an Apple Certificate
taskLaunch tests and publish a report as build test results.
project source directory
(that contains to pubspec.yaml
file).test name
as a regular expression matching substrings of the names of tests to run.Test plain name
as a plain-text substring of the names of tests to run.Test plain name
as a plain-text substring of the names of tests to run.update goldens
: whether matchesGoldenFile()
calls within your test methods should update the golden files rather than test for an existing match.concurrent
test processes to run. (defaults to 6
)Launch a Flutter command with custom arguments.
Flutter command isn't recognized ?
Make sure that you have a Flutter Install
at the beginning of your definition.
Can I run a custom Flutter command ?
Yes, right after the Flutter Install
task, a FlutterToolPath
environment variable points to the bin
of the Flutter SDK directory. You just have to use $(FlutterToolPath)
in your following tasks.
Can I run Dart program ?
Yes, actually a Dart runtime is embedded with Flutter tools (in the /cache/dart-sdk/bin
subdirectory).
A task example :
- task: CmdLine@2
displayName: 'Execute Dart program'
inputs:
script: '$(FlutterToolPath)/cache/dart-sdk/bin/dart program.dart arg1 arg2'
workingDirectory: 'src'