Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get Firebase App Distribution to work for different flavors with Kotlin DSL?

I have an issue with Firebase Distribution configuration. Here's a part of my build.gradle in Kotlin DSL

flavorDimensions("dim")
productFlavors {
    
    create("fl1") {
        applicationIdSuffix = ".fl1"
        setDimension("dim")
        firebaseAppDistribution {
            releaseNotes = "$name"
            groups = "group-fl1"
        }
    }

    create("fl2") {
        applicationIdSuffix = ".fl2"
        setDimension("dim")
        firebaseAppDistribution {
            releaseNotes = "$name"
            groups = "group-fl2"
        }
    }

}

Flavor 1 and flavor 2 are uploaded to 2 different Firebase projects - therefore I have two google-services.json files in: src/fl1 and src/fl2.

From observation Firebase App Distribution plugin uses always the config from second firebaseDistribution block. It looks like this is not set to flavor but globally. When I invoke for example assembleFl1Debug appDistributionUploadFl1Debug the correct .apk lands in correct Firebase project, but both release notes and groups are not correct. Anyone had a similar issue?

like image 272
user2290148 Avatar asked Jun 26 '20 09:06

user2290148


People also ask

How do I distribute Android apps for testing?

Distribute your app to testersSelect your Firebase project when prompted. On the Releases page, select the app you want to distribute from the drop-down menu. Drag your app's APK file to the console to upload it. When the upload completes, specify the tester groups and individual testers you want to receive the build.

Is firebase distributed?

Firebase App Distribution gives you a holistic view of your beta testing program across iOS and Android, providing you with valuable app feedback before a new release is in production.


1 Answers

I reported this to Firebase support and just received a confirmation that it is bug, but no workaround or fix date is scheduled yet :( This concerns only build.gradle files written in Kotlin DSL.

like image 133
user2290148 Avatar answered Oct 12 '22 23:10

user2290148