Skip to content

Android App Deployment (EN)

Thanh-Son-Philippe Lam edited this page Apr 7, 2019 · 33 revisions

This document is a WIP.

What do I have to do to publish a new version of ÉTSMobile bêta?

Not much. Currently, the deployment of the beta flavor is done automatically by Travis-CI and Gradle Play Publisher. The release process starts when a commit is made on master. Even though the process is automated, human intervention is still and only needed to update the release notes published on the Play Store. The app's release notes are stored here. Before committing on master, the release notes and should be changed. If not, the previous release notes will be used.

Steps done by Gradle Play Publisher and Travis-CI

Here are the steps done by Gradle Play Publisher and Travis-CI to release the beta version:

Step 0: Commit on master

The process starts when a commit is made to master.

Step 1: Start a build

A build is normally run by Travis according the travis.yml file. If the build succeeded, Travis will also execute the deploy block which simply execute the deploy_beta.sh script.

Step 2: Decrypt secret files

Since the source code is open-source, some files need to be keep secret. They have been encrypted. During a build, Travis will decrypt them and place them where to need to be.

Step 3: Publish on the Play Store

The deploy_beta.sh script will run the publishBetaReleaseApk Gradle command which will deploy the app on the Play Store. After a moment, the update should be available to the users.

If your are not familiar with Travis, you should take a look at their doc here.

The travis.yml configuration file is located here. Since the repo also contains the iOS app, a matrix has been specified to run a job for Android and another job for iOS.

App Signing

Before the releasing an app to the Play Store, it needs to be signed beforehand. Fore more information, take a look at the official doc here. With App Signing by Google Play, Google manages our signing key for us. We only to need to sign our app with an upload key. This key is stored in a keystore called etsm_upload_ks.jks. The encrypted version is stored here.

Furthermore, the signing information have been removed from build files since they are sensitive information. Take a look here to know how it has been done. To summarize briefly, the signing configuration in the app module build.gradle refers to properties stored in file called keystore.properties. The encrypted version of thie file is located here.

Gradle Play Publisher is a Gradle plugin that let you upload the your app and other details to the Play Store. Please start by reading through their doc here.

In this project, the configuration for Gradle Publisher is done in the app module build.gradle file.

Production version