hey24sheep / azure-flutter-tasks

Easily build and deploy with latest Flutter build tasks for Azure DevOps Pipelines Tasks
https://marketplace.visualstudio.com/items?itemName=Hey24sheep.flutter
MIT License
89 stars 22 forks source link
azure azure-devops azure-pipelines cd ci ci-cd cicd extension flutter flutter-app flutter-ci vsts vsts-extension vsts-tasks

Flutter Extension for Azure DevOps

Latest Flutter tasks for Azure DevOps.

Initially a fork maintained by me of the awesome work done by original author Github. As per people's request, this is now a separate repo as this is now an advanced/latest extension with more features.

NOTE : I will no longer maintain my fork instead this repository will be updated, as this has developed into a lot more than the original extension.

Support

PRs are always welcome. Feel free to create an issue if you face any problem.

Don't forget to star this repo, thanks πŸ‘

Buy Me A Coffee


Installation & Usage

Installation can be done using Visual Studio MarketPlace. Add the tasks to your build definition.


Pipeline Tasks

Install

Installs the Flutter SDK onto the running agent if not already installed. Then uses it for following tasks.

Build

Build the given mobile application project. You must call the Flutter Install task or use the optional flutterDirectory task input that points to your flutter/bin folder before execution. All application bundles are created in the build/outputs folder of your project.

NOTE : for --release builds, pass debugMode=false and profileMode=false

Test

Launch tests and publish a report as build test results.

Analyze

Launch analyze on flutter directory.

Command

Launch a Flutter command with custom arguments.

Env

Task to create the environment variables FlutterToolPath, FlutterPubCachePath and DartToolPath.

NOTE : Do not give path to 'bin' folder


Environment Variables

Environment variables created by the Install or Env tasks are :


FAQ

First, please read the WIKI and then FAQs before opening any new issues.

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. Example: "$(FlutterToolPath)/flutter packages get"

Can I run Dart program ?

Yes, right after the Flutter Install task, a DartToolPath environment variable points to the bin of the Dart SDK directory. You just have to use $(DartToolPath) in your following tasks. Example: "$(DartToolPath)/dart program.dart arg1 arg2"

Can I access Flutter's pub-cache ?

Yes, right after the Flutter Install task, a FlutterPubCachePath environment variable points to the pub-cache directory that Flutter installs all depdencies. You just have to use $(FlutterPubCachePath) in your following tasks. Example: "$(FlutterPubCachePath)/pubver set $(Version)"

Facing error - "No toolchains found in the NDK toolchains folder for ABI with prefix: arm-linux-androideabi" ?

Read this issue #16 for solution or this stackoverflow

How to run "Integeration Tests" ?

Read this wiki for steps, thanks to @maksymgendin for the help.

IOS build fail "Provisional Profile Errors" ?

Read this #35 for help

Any IOS or Android Examples (Setup Guide/YAML config)

Read this issue #37 and this wiki setup

iOS build fails with: "Xcode couldn't find any iOS App Development provisioning profiles matching..."

Read this issue #49


Sample Build Pipeline Config (3rd Party)

Disclaimer : These are 3rd Party YAML config, please use them on your own discretion

Improve

First, please read the WIKI and then FAQs before opening any new issues. Help me by reporting bugs, creating PRs, submit new ideas for features or anything else that you want to share.

More

Check out my other useful Flutter packages on pub.dev or more DevOps extensions on marketplace

Source Code

Source code can be found on Github.

Previous fork : Github

Original repo : Github.


License

MIT