-
Notifications
You must be signed in to change notification settings - Fork 205
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
Modularise bugsnag-android into JVM, NDK, and ANR artefacts #522
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mostly follow so far, and the changes make sense though with some naming questions:
- Is
bugsnag-android-ndk
going to be published? If so this is a fairly significant break. If not, thenbugsnag-android-ndk
could continue to be an alias forbugsnag-android
. - Were other naming conventions considered, like having a
bugsnag-plugin-*
namespace for the plugin artefacts? That would resolve the above point and separate reporting libs from plugin libs.
bugsnag-android-core/src/main/java/com/bugsnag/android/Configuration.java
Outdated
Show resolved
Hide resolved
e2e8f9f
to
4e7321d
Compare
4e7321d
to
4e05aa0
Compare
As discussed I will adapt this PR to do the following:
|
c781975
to
04e9c0b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a general point of organization, what happens if someone excludes the "jvm" plugin because they only want NDK and/or ANR reporting? It seems like the core constructs of error/session reporting are in the JVM plugin, but it may be a misunderstanding.
04e9c0b
to
b268d21
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The modularization split looks good. I got a bit further into the implementation of the plugins and added a few questions.
bugsnag-android-core/src/androidTest/java/com/bugsnag/android/AppDataTest.java
Outdated
Show resolved
Hide resolved
bugsnag-android-core/src/main/java/com/bugsnag/android/Configuration.java
Outdated
Show resolved
Hide resolved
bugsnag-android-core/src/main/java/com/bugsnag/android/NativeInterface.java
Outdated
Show resolved
Hide resolved
211372d
to
3ed0615
Compare
00f59fc
to
a247e2a
Compare
Goal
The current version of
bugsnag-android
includes JVM, NDK, and ANR error detection by default. We should modularise these into 3 separate artefacts, so that it's possible for users to exclude code/resources they do not use from their APK.This should be an invisible change to anyone using
bugsnag-android
andbugsnag-android-ndk
.Changeset
BugsnagPlugin
implementationsBugsnagPluginInterface
that allows for registration of pluginsBugsnagPluginInterface
, which theClient
attempts to load if the rightConfiguration
option has been setTests
Installed the artefacts into a local maven repository, and tested:
bugsnag-android
allows JVM, NDK, and ANR errors to be capturedbugsnag-plugin-android-anr
andbugsnag-plugin-android-ndk
can be excluded from the APK if their respective configuration options are disabledbugsnag-android
dependency, no shared libraries are loaded (improves init time from around 80ms to 50ms on a Nexus 5x)Remaining work