Updated (07 Nov 2019)
I've tried the following command and it works as expected
Assume that flavor
=Staging
and build
=Release
, Build_Variant
=StagingRelease
.
And based on Flutter
entry point file (--target)
=lib/main_stg.dart
./gradlew appDistributionUploadStagingRelease --project-prop target=lib/main_stg.dart
It seems like appDistributionUploadStagingRelease
re-build apk even though assembleStagingRelease
is not added in the command.
Issue
I've a project which contain the following flavors and targets
Flavors
- Dev
- Staging
- Production
Targets (<project_root/lib>)
- main_dev.dart (development)
- main_stg.dart (staging)
- main.dart (production)
I've been using this command
flutter build --release --target staging --t lib/main_stg.dart
for building Staging.
However, when executing FirebaseAppDistribution using ./gradlew appDistributionStagingRelease
, the uploaded APK ignore lib/main_stg.dart
and use lib/main.dart
.
Further check on the log indicate that it does not rebuild
> Task :app:appDistributionUploadStagingRelease
Found APK at <project_root>/build/app/outputs/apk/staging/release/app-staging-release.apk.
Uploading APK to Firebase App Distribution...
Getting appId from output of google services plugin
This APK has not been uploaded before.
Uploading the APK.
Uploaded APK successfully 202
No release notes passed in. Skipping this step.
Added testers/groups successfully 200
App Distribution upload finished successfully!
Does any Flutter
dev encounter similar issue? Kindly guide me for this.
Thank You