You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Android Studio version: Android Studio Ladybug | 2024.2.1 Patch 2
Firebase Component: App Distribution Gradle Plugin
Component version: 5.0.0
[REQUIRED] Step 3: Describe the problem
Steps to reproduce:
My project uses multiple buildType and productFlavor configurations as well as a dynamic feature module. I am using the com.google.firebase.appdistribution Gradle plugin to distribute a universal APK (due to the dynamic feature) through Firebase App Distribution.
To locate the correct APK, I override artifactPath in the AppDistributionExtension. Previously, this worked as expected, setting the appropriate path based on the buildType + productFlavor combination. However, after upgrading to AGP 8.7.0 or above, the artifactPath always retains the value of the last configured combination of buildType + productFlavor. As a result, when publishing to App Distribution, the plugin attempts to locate the APK at an incorrect path.
To illustrate the issue, I am attaching an archive with the project (I removed the dynamic feature setup for simplicity) TestApplication.zip, where two tasks can be run:
./gradlew :app:packageGoogleDebugUniversalApk - to build the universal APK.
./gradlew :app:appDistributionUploadGoogleDebug - to attempt to publish it.
If agp = 8.6.1 is specified in gradle/libs.versions.toml, everything works correctly, and the console displays a message like:
Using APK path specified by the artifactPath parameter in your app's build.gradle: some_path/app/build/outputs/apk_from_bundle/googleDebug/app-google-debug-universal.apk.
The subsequent error is expected since I haven’t configured publishing settings for the test.
However, if agp = 8.7.0 is specified in gradle/libs.versions.toml, the console shows a message like:
Using APK path specified by the artifactPath parameter in your app's build.gradle: some_path/app/build/outputs/apk_from_bundle/huaweiStore/app-huawei-store-universal.apk.
Regardless of the variant passed to appDistributionUpload, the plugin always attempts to locate the APK for the huaweiStore variant.
Question:
How can I now set the artifactPath parameter of AppDistributionExtension so that it depends on both buildType and productFlavor?
The text was updated successfully, but these errors were encountered:
Hi @denzap, thank you for reaching out and sharing an MCVE. I was able to reproduce the issue you raised. I'll raise this to our engineers and see what we can do here.
As a workaround, for now, I suggest specifying the artifactPath on the command.
[REQUIRED] Step 2: Describe your environment
[REQUIRED] Step 3: Describe the problem
Steps to reproduce:
My project uses multiple
buildType
andproductFlavor
configurations as well as a dynamic feature module. I am using thecom.google.firebase.appdistribution
Gradle plugin to distribute a universal APK (due to the dynamic feature) through Firebase App Distribution.To locate the correct APK, I override
artifactPath
in theAppDistributionExtension
. Previously, this worked as expected, setting the appropriate path based on thebuildType
+productFlavor
combination. However, after upgrading to AGP 8.7.0 or above, theartifactPath
always retains the value of the last configured combination ofbuildType
+productFlavor
. As a result, when publishing to App Distribution, the plugin attempts to locate the APK at an incorrect path.To illustrate the issue, I am attaching an archive with the project (I removed the dynamic feature setup for simplicity) TestApplication.zip, where two tasks can be run:
./gradlew :app:packageGoogleDebugUniversalApk
- to build the universal APK../gradlew :app:appDistributionUploadGoogleDebug
- to attempt to publish it.If
agp = 8.6.1
is specified ingradle/libs.versions.toml
, everything works correctly, and the console displays a message like:The subsequent error is expected since I haven’t configured publishing settings for the test.
However, if
agp = 8.7.0
is specified ingradle/libs.versions.toml
, the console shows a message like:Regardless of the variant passed to
appDistributionUpload
, the plugin always attempts to locate the APK for thehuaweiStore
variant.Question:
How can I now set the
artifactPath
parameter ofAppDistributionExtension
so that it depends on bothbuildType
andproductFlavor
?The text was updated successfully, but these errors were encountered: