Saturday, July 25, 2020

Building your Flutter App on Travis CI

It is simple to configure Travis CI Building your Flutter Application on Travis CI. All you have to do is add a build manifest file named .travis.yml which includes the build server instructions. 


Travis CI Yaml Configuration
See Travis CI yaml reference for more options. In the .travis.yml build instructions 3 steps are needed to build a flutter application. 
  1. Use a dart Docker container, "language: dart"
  2. Download Flutter, "git clone ..."
  3. Export the Flutter binary path, "export PATH..."
Example .travis.yml configuration
In this example flutter beta branch is used along with the web configuration.

# File: .travis.yml
# Reference: https://docs.travis-ci.com/user/languages/dart/
language: dart
dart:
  - stable

install:
  # https://flutter.dev/docs/get-started/web
  - echo "Configure Flutter"
  - git clone https://github.com/flutter/flutter.git -b beta
  - export PATH="$PATH:`pwd`/flutter/bin"
  - flutter upgrade
  - flutter config --enable-web
  - flutter doctor

script:
  - flutter build web

  
Example Project
Check out an example project config here which uses Travis CI to build the Flutter web app. 

7 comments:

Android App Development Service said...

Very nice information sharing by author for more information visit here :flutter app developer

Harshan said...

Useful blog, keep sharing with us.

Benefits of Flutter in Mobile App Development
Advantages of Flutter in Mobile App Development

deenadayalan said...

its very useful and informative blog thanks for sharing.
website Re-design in chennai
Best Software company in Chennai

Simplileap Digital said...

Thanks for your post. It's very helpful post for us. I would like to thanks for sharing this article here. Responsive Web Design Company in Bangalore

Aarthi Ramesh said...

Nice blog, keep sharing with us.

Mobile Application Development Course in Chennai
Mobile App Development Online Training
Mobile App Development Training in Bangalore

Shiva Shakthi said...

Nice Post!!! thanks for sharing this post with us
How Can Google Ads Help?
How Google Ads Works for Small Business?

Daniel Bryan said...

Very informative content. Useful for beginner and advance both for. Awaiting to get more latest content in future. Thanks!
nonprofit marketing companies

Trying out the Dart Analysis Server

I wanted to see how the Dart Analysis Server was put together and worked. I started looking to see how I could wire it up and try out the co...