Announcing the 1.0 release of Flutter CI on Bitrise.
Ever since Flutter's first version, we've been thrilled to see the enthusiastic community build their initial Flutter projects on Bitrise by adding our multi-functional script step. Another upgrade came shortly after with the community-created Flutter step (thanks, Karol!). Today, we go one step further, making Bitrise into the full-featured Flutter CI the community deserves.
What does supporting Flutter mean?
Starting today, you can add your Flutter app to our scanner and it'll provide your project with two Flutter specific workflows which will allow you to test, build and deploy your app. Find detailed instructions on getting started further down this article.👇
Also, if you're not on Bitrise yet, this is an excellent time to Register and Start Building for Free
Supporting the Flutter Community
Flutter has been around for a relatively short time, but in that time, it made a lot of noise. One reason is the firm commitment from Google's Flutter team (thanks for the feedback, Tim!), but another one is the massive way in which a tight-knit community grew and embraced Flutter. Some of these same community members have helped us get Bitrise's Flutter support up the the standard we adhere to for more mature technology like Swift, Kotlin and others. To ensure that we continue being the best possible place for Flutter CI, we've added a #flutter channel on our public Slack where you can connect to our tooling team (mobile engineers and Flutter users themselves) and other Bitrise users.
Additionally, we'll be speaking at March's Flutter meetup hosted by the Flutter Japan User Group and we're looking for more Flutter events/meetups to support and participate in. If you host a regular Meetup and would like us to support that in any shape or form, click over to our mobile meetup support form and we'll be in touch shortly.
Last but not least, on our dedicated Flutter CI page, you'll find a (by no means complete) list of the 'Flutter folks to follow' on Twitter, as well as some more info on the features and functionality offered. Some highlights:
- Support for solo developers, teams and enterprises;
- Reuse workflows between Flutter and native projects;
- Supports Github, Gitlab, Bitbucket and locally hosted gits;
- Integrated with 200+ services and steps out of the box, requiring minimal setup;
- Free building for smaller projects, access to paid features for free for open source apps.
Our aim here was to bring you a mature Flutter CI / CD experience, that offers all the power and customizability that you'll find in CI for other mobile technologies. We also want to allow bigger teams to experiment with - and discover the power of - Flutter from within their 'regular' mobile development environment, opening up the Flutter experience to an even bigger audience. Over the next weeks, months, years we'll continue to iterate and improve on the experience to ensure that Bitrise is - and stays - the best place for your Flutter development.
Now, on to the really interesting stuff:
Adding a Flutter app to Bitrise
This is what adding a Flutter app to Bitrise looks like:
1. Select your Flutter repo and our scanner will recognize it as a Flutter app.
2. Set access and branch
3. Does your app have tests in the repo? Do you use them and will you update them? (No is fine too, just be truthful so that your builds won't fail.)
4. Select ipa export method (under Project build configuration's Flutter project section)
5. Register a webhook.
6. Watch your first build :)
If you have platforms in your repo, there are two workflows generated by default for your project: primary and deploy. If you have a repo with a package or a plugin only, you'll only get the primary workflow with or without the test step, depending on your choice during setup.
Primary will install Flutter and test it, but testing is optional. (Flutter Test will only be there by default if you select running tests in the scanner. But you can add it anytime.)
Flutter analyze step will run static code tests.
The content of this workflow depends on what platforms your repo contains: Android, iOS or both.
The Deploy workflow will install Flutter, test the app (optional), build the .apk and the iOS app too. Xcode-archive might be included too, configured to generate the final .ipa.
- Flutter app project
In case of a Flutter app, you can either have an iOS app and then have the Xcode Archive step, or not. 😀
In case of a package or a library, there won't be a Flutter build step and a Flutter archive step in the workflow as there isn't an artifact to build.
If you have an iOS app, you'll need your codesigning files, so make sure you upload them (Workflow editor / Codesign tab)
Using the 4 new steps
We've also created 4 Flutter steps, which you'll find in your predefined workflows. Let's see how they work.
Flutter Install will install the Flutter version of your choice. You'll only need to choose the Flutter SDK version. The default is always the latest stable version.
This step will run the flutter test command. You'll need to set the project location (the root dir of the project) and you might want to add some additional parameters for the flutter test command.
This step will run the flutter analyze command. You'll need to set the project location (the root dir of the project) and you might want to add some additional parameters for the flutter analyze command.
This step will run the flutter build apk and the flutter build ios commands.
You'll need to set the project location (the root dir of the project) and choose the platform(s) you want to build for (Android or iOS or both). And then configure each platform:
iOS Platform Configs
- codesign identity: if you have more than one codesign identity, you can choose which one to use.
- additional parameters: if you want to add anything behind flutter build ios
- output pattern: you can set what the step should export
Android Platform Configs
- additional parameters:
- if you want to add anything behind flutter build apk
- output pattern: you can set what the step should export
If you run into any issues, have feedback or would just like to chat about Flutter, jump onto our public Bitrise Slack and join the #flutter channel. We'll have engineers monitoring the channel throughout the day.
Also, feel free to reach out to us through the in-platform chat (icon in the bottom right-hand corner of your screen) or tweet us at @bitrise on Twitter.
Happy building! 🚀