Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow overriding the versionCode via Configuration #610

Merged
merged 4 commits into from
Oct 9, 2019

Conversation

fractalwrench
Copy link
Contributor

Goal

Allows overriding the versionCode either through a manifest meta-data element or programmatically on the Configuration object. This facilitates grouping for custom versioning schemes. By default, the versionCode still uses the android:versionCode manifest value once a Client has been instantiated.

Changeset

Added integer versionCode field to Configuration which can also be read via the AndroidManifest meta-data element com.bugsnag.android.VERSION_CODE. By default if this value is not configured, the Client will set the versionCode to the value supplied in android:versionCode of the AndroidManifest.

Tests

Ran the example app and confirmed that for a handled, unhandled, and NDK error, the versionCode reported in the dashboard differs for:

  • the default android:versionCode value set in the manifest
  • the com.bugsnag.android.VERSION_CODE value set in the manifest
  • the value set on config.versionCode

Updated existing integration tests to verify that the value is loaded from the manifest and can be overridden.

Allows overriding the versionCode either through a manifest meta-data element or programmatically on
the Configuration object. This facilitates grouping for custom versioning schemes. By default, the
versionCode still equals the android:versionCode manifest value (once a Client has been
instantiated)
@fractalwrench fractalwrench changed the base branch from master to next October 4, 2019 15:22
Copy link
Contributor

@tomlongridge tomlongridge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@fractalwrench fractalwrench merged commit 3471dde into next Oct 9, 2019
@fractalwrench fractalwrench deleted the version-code-override branch October 9, 2019 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants