bugsnag-android-gradle-plugin
bugsnag-android-gradle-plugin copied to clipboard
Could not create task ':app:uploadBugsnagInternal-releaseMapping'
Describe the bug
We're using Bugsnag's Gradle plugin in combination with gradle-play-publisher, that creates a set of publish
tasks which we use to publish bundles to Play store. Here's the Gradle task that the CI runs:
gw publishInternalReleaseBundle -Dci=true
After the update to bugsnag-android-gradle-plugin:5.7.5
the task above started failing at configuration phase with the following error:
* What went wrong:
Could not determine the dependencies of task ':app:publishInternalReleaseBundle'.
> Could not create task ':app:uploadBugsnagInternal-releaseMapping'.
> java.io.FileNotFoundException: /Users/.../app/build/intermediates/gpp/internalRelease/available-version-codes.txt (No such file or directory)
I can reproduce it consistently on a local machine by running:
gw publishInternalReleaseBundle -Dci=true --dry-run
bugsnag-android-gradle-plugin:5.7.4
does not exhibit the same issue.
Here's what the bugsnag
configuration looks like in our build.gradle
:
bugsnag {
variantFilter { variant ->
def isDebug = variant.name.toLowerCase().contains("debug")
variant.enabled = !isDebug || isCi
}
uploadJvmMappings = isCi
}
Apologies if this isn't a Bugsnag Gradle plugin issue (I don't see any references to available-version-codes.txt
in the codebase, whereas gradle-play-publisher
does reference this file), however I'm curious if you have any thoughts on why the issue only manifests in 5.7.5
and higher. I'll follow up with filing a bug against gradle-play-publisher
.
Environment
- Android Studio version: 2020.3.1 Canary 14
- Android Gradle version: 6.8.3
Hey @Egorand, thanks for raising this. As you alluded to, this exception is definitely coming from gradle-play-publisher
, which is setting that file as an input on this task.
It's possible that our plugin might be triggering eager initialization of that task so that it runs sooner in the build lifecycle than it would otherwise, but we'd be interested to hear what the gradle-play-publisher
folks have to say as it's not clear if this is an issue with the Bugsnag plugin.
Thanks @yousif-bugsnag. I filed an issue against gradle-play-publisher, hoping to hear from the maintainers: https://github.com/Triple-T/gradle-play-publisher/issues/940.
We've seen the update here: https://github.com/Triple-T/gradle-play-publisher/issues/940#issuecomment-823466259
We're planning to look into a fix.
Any updates on this issue? It's currently blocking us from being able to upgrade to Gradle 7.
Hi @Egorand, I don't have any updates for you at the moment, but we'll keep you posted on this thread when a fix is released