I'm implementing app distribution for android with github actions, everything seems to be okay but I'm getting an error:
* What went wrong:
Execution failed for task ':app:appDistributionUploadQaRelease'.
> Missing app id. Please check that it was passed in and try again
I'm using google play plugin so it should get the app id automatically.
appId -- Your app's Firebase App ID. Required only if you don't have the Google Services Gradle plugin installed.
I have google-services.json
file in app module,
in root
build.gradle
:
classpath 'com.google.gms:google-services:4.3.10'
classpath 'com.google.firebase:firebase-appdistribution-gradle:3.0.0'
in app
's build.gradle
:
plugins {
....
id 'com.google.gms.google-services'
id 'com.google.firebase.appdistribution'
}
in qa
flavour:
productFlavors {
....
qa {
applicationId "custom.package.for.qa"
....
firebaseAppDistribution {
releaseNotes = "something 123"
groups = "testers"
}
}
}
if I add "appId = ...."
inside firebaseAppDistribution
, the build is uploaded successfully. but this shouldn't be necessary because of google play plugin.
and in github action:
- name: Build & Deploy
run: |
export FIREBASE_TOKEN=${{ secrets.FIREBASE_TOKEN }}
./gradlew --stop
./gradlew clean
./gradlew assembleQaRelease appDistributionUploadQaRelease
Thanks!
firebase-appdistribution-gradle:3.0.0
. The weird thing is it works when I run the./gradlew
command directly from command line. However on a fresh checkout and when all caches (gradle etc.) are cleaned, on the first run, it fails from the command line too. On the second run, it works. The problem is that CI (GitHub actions/CircleCI) always runs on a fresh checkout. – Theoretics