-
-
Notifications
You must be signed in to change notification settings - Fork 222
Detect Sentry Java SDK dependencies during build #4079
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
I've got this one ready to go #4075 |
Interesting. Thanks heaps for bumping to 8.x! TLDR; I think we need both PRs so will just have to deal with merge conflicts. Full explanation, this PR doesn't bump the version at all. It exists to detect and add missing Java dependencies:
The tooling that uses the POM files to create errors for missing java dependencies was only added in net9.0 so I had to add a net9.0 target to get the errors... then trawl the net9.0-android dependencies for MAUI core to identify the appropriate minimum versions for these. |
Resolves Java dependencies for all of the existing Maven repositories we depend on.
Relates to:
DSN is required.
crash on launch when a valid DSN is specified #3755 (comment)To fix that particular issue, we need to add an
AndroidMavenLibrary
reference to thesentry-android-replay
ArtefactId when implementing:Summary
.NET 9 adds some features that allow us to detect Java dependencies, with build warnings for any that are missing 🎉
Previously we downloaded java/aar files for Sentry's Java SDK from Maven and then referenced these directly with
AndroidLibrary
XML tags. The new features in .NET 9 allow us to include a Manifest/POM file when referencing *.java files (the POM file is what describes the dependencies of the java library) or to reference maven repositories directly withAndroidMavenLibrary
tags which takes care of downloading the java and POM files and referencing these.Solution
For all of this to work,
Sentry.Bindings.Android.csproj
has to targetnet9.0-android
. So I've added a net9 target and it turns out we were missing various dependencies:Although the tooling only identifies these when targeting net9, I believe we were missing the same dependencies when targeting net8.0. This may explain various "missing class" errors that users have been reporting at runtime.
In addition to adding the tooling to ensure we get appropriate warnings then, this PR also includes appropriate versions of the missing libraries.
References