Fastlane Setup for Android

Owais Idris
Geek Culture
Published in
3 min readMay 26, 2021

--

Simplified steps to setup fastlane for you Android Project.

This is a 2nd part of Fastlane Series. You might want to checkout following

  1. Installing Fastlane in Ubuntu

Prerequisites:

  • ruby 2.5 or above
  • Ubuntu 16.04 or above

Following steps are required to complete the setup.

  1. Install Ruby and Fastlane. Follow this article Installing Fastlane in Ubuntu
  2. Install Bundler
  3. Setup your Android Project
  4. Create Service Account with Google Console
  5. Use a Json from 4 to initialise fastlane in project

Install Ruby and Fastlane

This should give you an output

From previous article

Install Bundler

sudo gem install bundler

Setup your Android Project

Create a Gemfile in you root directory of project. Containing following text

source "https://rubygems.org"

gem "fastlane"

Run following command and add Gemfile and Gemfile.lock to your version control

bundle update

Following was my output ending with Bundle Updated

output of bundle update

Create Service Account Google Console

Actual docs actually have quite a good explanation so I won’t do anything additional. Follow here

Steps to create json secret file

This json secret file is needed during the initialisation of fastlane. Fastlane require path to this file to function.

The image shows starting point where you will find API Access on new Google Play Console.

Use a Json from 4 to initialise fastlane in project

fastlane init

above command will be executed and it will ask for 2 things
1. Package Name (com.krausefx.app):
2. Path to the json secret file. (created in step 4)

If all goes well rest of the execution is like a walk through of fastlane doc.

Meta data and screenshots
Lanes
Customise Fastfile
Final output

Finally Test your Fastlane

fastlane

The above command give following output. How ever it is recommend to use

bundle exec fastlane

--

--

Owais Idris
Geek Culture

Into Android Development. Love for Automobile.