Detect Sentry Java SDK dependencies during build#4079
Merged
jamescrosswell merged 8 commits intomainfrom Apr 7, 2025
Merged
Conversation
Contributor
|
I've got this one ready to go #4075 |
Collaborator
Author
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. |
aritchie
approved these changes
Apr 7, 2025
This was referenced Aug 18, 2025
This was referenced Sep 8, 2025
This was referenced Sep 15, 2025
This was referenced Sep 22, 2025
This was referenced Oct 6, 2025
This was referenced Oct 20, 2025
This was referenced Nov 3, 2025
This was referenced Dec 8, 2025
This was referenced Dec 15, 2025
This was referenced Jan 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
AndroidMavenLibraryreference to thesentry-android-replayArtefactId 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
AndroidLibraryXML 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 withAndroidMavenLibrarytags which takes care of downloading the java and POM files and referencing these.Solution
For all of this to work,
Sentry.Bindings.Android.csprojhas 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