Skip to main content

CONFIGURATION GUIDE

Configuring Android App Distribution

It's time for you to set up your Android app distribution pipeline. You'll configure the necessary credentials to publish your apps to the Google Play Store.

Setting Up Android Code Signing

Tutorial Video

Video recording in progress. Available soon.

Every Android app needs a digital signature - think of it as your app's unique fingerprint that verifies its authenticity to the Play Store. We'll create a new one and add it to Codemagic.

Creating Your Keystore

To generate a keystore, you'll need to use Java's Keytool utility from the command line. This command will ask you to enter your details and set up passwords for both the keystore and the key. It will create a keystore file named codemagic_your_team_name.keystore valid for 10,000 days.

Keystore Name

Make sure to replace your_team_name with your actual team name in snake case in the command below.

Unix
keytool -genkey -v -keystore codemagic_your_team_name.keystore -storetype JKS \
-keyalg RSA -keysize 2048 -validity 10000 -alias codemagic_your_team_name

Adding Your Keystore to Codemagic

Let's securely store your keystore in Codemagic:

  1. Open your Codemagic Team settings
  2. Navigate to Code signing identities
  3. Select the Android keystores tab
  4. Upload your keystore file (drag and drop or choose file)
  5. Enter the required credentials:
    • Keystore password
    • Key alias
    • Key password
  6. For the reference name, enter Android Keystore (YOUR_CODEMAGICTEAM) or Android Keystore (Personal Account) if you are using your personal account.
  7. Click Add keystore to save

Important Security Note

Keep your keystore file somewhere safe! While Codemagic stores it securely, you won't be able to download it again later. So make sure to save it in a secure location and save the password in a secure place. Never commit it to a public repository.

Enable Automatic Google Play Publishing

In order for Codika to create the necessary service accounts to automate Play Store publishing, we need access to a Google Cloud project.

If you plan to use Firebase as a backend in your apps, we'll use that same Firebase project to manage your service accounts. No extra setup is required now.

However, if you're not using Firebase as backend we recommend creating a single Firebase project dedicated to manage service accounts for publishing to the Play Store.

You won't be using Firebase features

This Firebase project is only used to host service accounts. You don't need to use Firestore, Auth, or any other Firebase product. Just the project shell is enough.

You'll only need to create this project once, and it will be reused across all your apps. To setup a default Firebase project for Codika to manage your service accounts, run:

codika configure default-gcp

This will launch an interactive prompt. You'll have the option to create a new Firebase project or link an existing one.

? How do you want to set up your default GCP project?
❯ ◉ Create new Firebase project
Link existing Firebase project

The project id will be stored in your CLI config.

What's Next?

Perfect! Your Android signing credentials are now set up. Let's move on to configuring Shorebird for live app updates.