I have recently updated the version of the Firebase Appdistribution Gradle plugin from 1.4.0
to 2.0.1
.
Since then Jenkins started giving the build time error below:
Execution failed for task app:appDistributionUpload[Variant]. Could not find the APK. Make sure you build first by running ./gradlew assemble[Variant], or set the api Path parameter to point to your APK
This is my Gradle script on Jenkins:
... ./gradlew cleanBuildCache :app:testDebugUnitTest :app:appDistributionUpload[Variant] ...
Starting with version
1.4.1
Running appDistributionUpload{Variant} no longer automatically rebuilds the app.https://firebase.google.com/support/release-notes/android#appdistro_gradle_plugin_v1-4-1
Updating the Gradle script by adding
:app:assemble[Variant]
before:app:appDistributionUpload[Variant]
solved the issue in my case. Hope it will help others as well.