Closed deecewan closed 3 years ago
I can confirm that downgrading and fixing the version to 5.7.8
makes our CI pass again.
Hi @deecewan - we're taking a look at this, but as you suggest fixing the version at 5.7.8
for now should resolve the issue!
yep - we've downgraded for now.
Hi @deecewan
We have now released v5.8.1 which should reverse a fix that we added which had the effect of breaking it when using the API key with a resource value e.g. @string/BUGSNAG_API_KEY.
For now you could upgrade to v5.8.1 which should restore previous behaviour.
More generally, while it works in certain circumstances, inserting the API key via a resource file is not a technique that we recommend as it’s a runtime mechanism that is resolved by a running app, but there is no reliable API available to do this at build time. Instead we document and recommend that the API key – and other configuration values – are controlled via manifest placeholders and build variants. See our online documentation for details.
However it is probable that in the next major release of the Bugsnag Android Gradle Plugin, we will no longer allow it. Therefore you might wish to consider changing approaches for inserting the API key configuration option in the future.
@johnkiely1 yep - i ended up changing to manifest placeholders as the docs suggest. mostly opened the issue because it was a breaking change where i didn't expect a breaking change.
Describe the bug
We currently have
@string/BUGSNAG_API_KEY
in ourAndroidManifest.xml
, and this string resource value is generated at build time based on what variant we're using. This failure happens when the string is static instrings.xml
, too, tho.In v5.7.8, this worked as expected. In v5.8.0, this results in
being generated when running the
bugsnagRelease<variant>Task
.I imagine that this plugin is parsing the
AndroidManifest.xml
before it's been fully merged? Unsure.Steps to reproduce
bugsnag-android-gradle-plugin
v5.8.0 to a project./gradlew assembleRelease
Environment
Gradle 6.7.1
v5.8.0
Example Repo