Note: this only occurs after upgrading Firebase App Distribution Gradle plugin to 3.0.0 or newer.
Hi there,
We have in our project a gradle task to rename the apk file after generating it:
applicationVariants.all { variant ->
variant.outputs.all { output ->
def fileName = "newApkName.apk"
outputFileName = new File("../../", fileName)
project.logger.info("APK file destination: ${outputFileName}")
}
}
And here is the Firebase App Distribution task
firebaseAppDistribution {
artifactType = "APK"
testers = "testers"
serviceCredentialsFile = project.buildscript.sourceFile.parent + "/firebase-app-distribution.json"
}
After launching ./gradlew appDistributionUploadStagingDebug
the task fails giving a "Could not find an APK file for this variant for App Distribution" error.
I have tried setting the artifactPath
to the outputFileName
generated by the rename task, but it does neither find it.
As I mentioned before, if I downgrade Firebase App Distribution gradle plugin to 2.2.0 it works like a charm (without need to set artifactPath
), but not in newer versions.
Has anyone encountered this error? Thanks in advance.