-
-
Notifications
You must be signed in to change notification settings - Fork 55
feat: Managed layer initializes native SDK on Android #1924
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
Conversation
…sentry/sentry-unity into chore/sample-no-thumb-update
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.
CI seems not to be running
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 see 5 new tests for quite a significant change. I'm concerned there are lot of untested use cases. Isn't that the case?
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.
One issue left which is the thread.Join
on Dispose which can throw.
Other than that, lgtm
Android: Android SDK Initialization
Overview
Implements the late initialization of the Android SDK. This allows users to apply code changes to the options and for those options to apply to the native layer. Related issue: sentry-unity#1907
Implementation Details
The SDK now always includes the Android SDK in the generated Gradle project with the following changes:
AndroidNativeInitializationType
to the SentryOptions. This allows users to switch betweenRuntime
andBuildTime
initialization and defaults toRuntime
.AndroidNativeSupportEnabled
controls whether the SDK should add native support. This helps i.e. in the case of UaaL where users want to completely disabled the SDK from modifying the Gradle project.AndroidNativeInitializationType
enumRuntime
the SDK will addauto-init = false
.BuildTime
it will add the options and let the Android SDK autoinitialize.SentryNativeAndroid.Configure
checks whether the native SDK was already initializedPending Tasks
RuntimeInitialization
is default. This means we're missing testingBuildTime
in CI right now.