Android Firebase App Distribution — On Kotlin DSL with Multiple BuildTypes support

Pedro Vicente
3 min readNov 8, 2022
Firebase screenshot

I’ve recently started a project where I wanted to use Firebase Distribution to send Alpha and Beta builds to the stakeholders.

I’ve used it dozens of times previously, so that seemed like a walk in the park… except this time I was using Kotlin DSL.

From the Firebase documentation ( read here ) I was doing something like:

plugins {
id("com.android.application")
kotlin("android")
id("com.google.gms.google-services")
id("com.google.firebase.crashlytics")
id("com.google.firebase.firebase-perf")
id("com.google.firebase.appdistribution")
}

android {
namespace = "my.beautiful.app"
compileSdk = Android.compileSdk

defaultConfig {
applicationId = "com.my.app"
minSdk = Android.minSdk
targetSdk = Android.compileSdk
versionCode = 1
versionName = "1.0"
}

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary = true
}
}

signingConfigs {
create("internal") {
keyAlias = System.getenv("ANDROID_KEY_ALIAS")
keyPassword = System.getenv("ANDROID_KEY_PASSWORD")
storeFile = System.getenv("ANDROID_KEYSTORE_FILE")
storePassword =…

--

--

Pedro Vicente
Pedro Vicente

Written by Pedro Vicente

Improver | Mobile Service Lead @minderaswcraft | Feedback @ LoopGain | Communities @GDGPorto | 🔥 @ O Que Arde Cura

No responses yet