-
-
Notifications
You must be signed in to change notification settings - Fork 58
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
bruno-garcia
left a comment
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
bruno-garcia
left a comment
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?
bruno-garcia
left a comment
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:
AndroidNativeInitializationTypeto the SentryOptions. This allows users to switch betweenRuntimeandBuildTimeinitialization and defaults toRuntime.AndroidNativeSupportEnabledcontrols 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.AndroidNativeInitializationTypeenumRuntimethe SDK will addauto-init = false.BuildTimeit will add the options and let the Android SDK autoinitialize.SentryNativeAndroid.Configurechecks whether the native SDK was already initializedPending Tasks
RuntimeInitializationis default. This means we're missing testingBuildTimein CI right now.