Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Generate flutter apps with Azure DevOps
parameters:
- name: appFolder # ex : ./src/MyApp
type: string
- name: flutterVersion # ex : 1.17.5
type: string
- name: appVersion # ex : 1.10.1
type: string
- name: appBuildNumer # ex : 303 (/!\ the build number must be incremental when the package is published on the store)
type: string
steps:
- task: FlutterInstall@0
displayName: 'install flutter ${{ parameters.flutterVersion }}'
inputs:
channel: 'stable'
version: 'custom'
customVersion: '${{ parameters.flutterVersion }}'
- task: FlutterBuild@0
displayName: 'build android aab'
inputs:
target: 'aab'
projectDirectory: '${{ parameters.appFolder }}'
buildName: '${{ parameters.appVersion }}'
buildNumber: '${{ parameters.appBuildNumber }}'
- task: CopyFiles@2
displayName: 'copy android aab'
inputs:
Contents: '${{ parameters.appFolder }}/**/app.aab'
TargetFolder: '$(Build.ArtifactStagingDirectory)/${{ parameters.appFolder }}/android'
flattenFolders: true
- task: PublishBuildArtifacts@1
displayName: 'publish packages'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'packages'
publishLocation: 'Container'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.