Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aloisdeniel/vsts-flutter-tasks
Flutter build tasks for Azure DevOps Pipelines/TFS.
https://github.com/aloisdeniel/vsts-flutter-tasks
android azure devops flutter ios mobile vsts
Last synced: 12 days ago
JSON representation
Flutter build tasks for Azure DevOps Pipelines/TFS.
- Host: GitHub
- URL: https://github.com/aloisdeniel/vsts-flutter-tasks
- Owner: aloisdeniel
- Created: 2018-10-04T06:11:58.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-09-20T13:24:13.000Z (about 1 year ago)
- Last Synced: 2024-10-11T22:43:05.447Z (27 days ago)
- Topics: android, azure, devops, flutter, ios, mobile, vsts
- Language: JavaScript
- Homepage: https://marketplace.visualstudio.com/items?itemName=aloisdeniel.flutter
- Size: 257 KB
- Stars: 107
- Watchers: 13
- Forks: 83
- Open Issues: 46
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
> 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](https://twitter.com/aloisdeniel).
# Flutter for Azure DevOps
[Flutter](http://flutter.io) build task for [Azure DevOps](https://azure.microsoft.com/fr-fr/services/devops/).
## Installation
Installation can be done using [Visual Studio MarketPlace](https://marketplace.visualstudio.com/items?itemName=aloisdeniel.flutter).
## Source Code
Source code can be found on [Github](https://github.com/aloisdeniel/vsts-flutter-tasks).
## Usage
Add the tasks to your build definition.
### Install
![](images/step_install.png)
Installs the [Flutter SDK](https://flutter.io/sdk-archive/) onto the running agent if not already installed. Then uses it for following tasks.
* Select the `channel`: `stable (default)`, `beta`, or `dev`.
* Select the `version` of the SDK to install: `latest (default)`, `custom`. If `custom` is specified, a `custom version` must be set.
* _(Optional)_. Set the `custom version` (in a `..` semver format) if needed.
### Build
![](images/step_build.png)
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.
* Select the `project source directory` (that contains to `pubspec.yaml` file).
* Select the `target` platform: `Android (default)`, `iOS`, or `All` for both.
* _(Optional)_. Set `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.
* _(Optional)_. Set `package name` (like `1.2.3`) that will override the manifest's one.
* _(Optional)_. Set `package number` (like `12`) that will override the manifest's one.
* _(Optional)_. Set `build flavour` (like `development`) to specify a build flavour. Must match Android Gradle flavor definition or XCode scheme.
* _(Optional)_. Set `debug` if you wish to override the default release mode for the build.
* _(Optional)_. Set `Additional arguments` if you wish to adds custom arguments to the `build` command.
* __(Android)__._(Optional)_. Set `platform` for the Android target: `android-arm (default)`, `android-arm64`.
* __(iOS)__._(Optional)_. Set `platform` for the iOS target: `device (default)`, `simulator`.
* __(iOS)__._(Optional)_. Codesign the application bundle (only available on device builds, and activated by default). **Warning: you must install a valid certificate before build with the `Install an Apple Certificate`task**### Test
![](images/step_test.png)
Launch tests and publish a report as build test results.
* Select the `project source directory` (that contains to `pubspec.yaml` file).
* _(Optional)_. Set `test name` as a regular expression matching substrings of the names of tests to run.
* _(Optional)_. Set `Test plain name` as a plain-text substring of the names of tests to run.
* _(Optional)_. Set `Test plain name` as a plain-text substring of the names of tests to run.
* _(Optional)_. Set `update goldens`: whether `matchesGoldenFile()` calls within your test methods should update the golden files rather than test for an existing match.
* _(Optional)_. The number of `concurrent` test processes to run. (defaults to `6`)### command
Launch a Flutter command with custom arguments.
## FAQ
> 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 :
```yaml
- task: CmdLine@2
displayName: 'Execute Dart program'
inputs:
script: '$(FlutterToolPath)/cache/dart-sdk/bin/dart program.dart arg1 arg2'
workingDirectory: 'src'
```## License
[MIT](https://raw.githubusercontent.com/aloisdeniel/vsts-flutter-tasks/master/LICENSE)