Fastlane : An automated app deployment tool – Part 2

Overview

The Fastlane is the automated tool for the entire app store deployment process.

Fastlane has following capabilities :

  • Make a repeatable custom work process to build, upload and distribute new releases to the play store.
  • Upload and deal with the greater part of your application’s metadata including screen captures.
  • Automatically submit new versions of your application for review.

Introduction

Fastlane helps developers by publishing/uploading an app along with all the necessary details with just a few commands. But before having this advantage, we need to set it up with the app.

In this part of the series, I’ll explain the core functionality of Fastlane, starting right from it’s installation process

How to install fastlane

Open the terminal and run the following command for installation.

Now reach at the project directory in which you have to install the fastlane for that particular project.
fastlane-2-1

Setup the fastlane for the Project

Setup the Fastlane for the particular project by executing the following command from inside the specific project folder.

  1. Please enter the package name for your application when asked. (Ex. com.yudiz.example)
  2. Enter the path for the json secret file for that application access. For more information please click here.
  3. Press ‘N’ when asked if you plan on uploading info to Google Play Store via fastlane.

fastlane-2-2

Now you can able to watch the fastlane folder inside the project with configuration as on the base of your provided information.

Now you can find the two files inside the fastlane configured folder.

  1. Appfile -> which will define the global configuration information to your app.
  2. Fastfile -> which will define the ‘lanes’ that drive the behavior of fastlane.

What is the supply in fastlane?

Supply is a fastlane tool that transfers application metadata, screenshots and binaries to Google Play Developer Console.

Collect your Google Credentials from Google Play Developer Console

Now you have to download the .json credentials file from google developer console for uploading the application using the fastlane. Click here for detailed document

Make Configuration for Fastlane

Go into your project folder then open the fastlane > Appfile. Now change the path for the json_key_file and save them.

Environment variable setup

Fastlane requires some condition factors set up to run effectively. Specifically, having your locale not set to an UTF-8 locale will cause issues with building and uploading your assemble.

Configure build.gradle for creating Release Apk

We have to configure of release apk keystore, alias and password in the build.gradle file for generating the release apk using fastlane.

Fetch your App Metadata from Google Play Console

In the event that your application has been made on the Google Play Developer Console, you’re prepared to begin utilizing supply to manage it! Run:

Now all of your Google Play Store Application metadata is downloaded at fastlane supply init.
Because of confinements of the Google Play API, supply can’t download screenshots or videos.

Deploy your application on Google Play Store

Now you have to add the fastlane plugin for incrementing the version code and you have to create the lane for the supply of the application on the play store.
Add the following code in your ./fastlane/Fastfile.

Now run the command for installing the fastlane plugin for incrementing the version code of apk in the terminal and if they ask to add it in Gem file then press Y. You have to add only once for each project.

After installing the plugin now run the fastlane deploy command for the deployment process or run the fastlane beta command if you want to deploy it in the beta version.

fastlane-2-3

Its Done.

mm

Shubham Sejpal Android Developer

I am an ambitious Android Developer at Yudiz Solutions Pvt. Ltd. , Worked on many Android Apps. I am a hard working android geek and love learning new techniques in android . Always looking for new hard challenges , because nothing good comes easily.

Comments are closed.

Top