Skip to content

Commit b3b705c

Browse files
authored
chore(deps): update Java SDK to v8.6.0 (#4075)
1 parent 101a40b commit b3b705c

File tree

4 files changed

+65
-6
lines changed

4 files changed

+65
-6
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
- Bump CLI from v2.42.2 to v2.43.0 ([#4036](https://github.com/getsentry/sentry-dotnet/pull/4036), [#4049](https://github.com/getsentry/sentry-dotnet/pull/4049), [#4060](https://github.com/getsentry/sentry-dotnet/pull/4060), [#4062](https://github.com/getsentry/sentry-dotnet/pull/4062))
2525
- [changelog](https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#2430)
2626
- [diff](https://github.com/getsentry/sentry-cli/compare/2.42.2...2.43.0)
27+
- Bump Java SDK from v7.20.1 to v8.6.0 ([#4075](https://github.com/getsentry/sentry-dotnet/pull/4075))
28+
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#860)
29+
- [diff](https://github.com/getsentry/sentry-java/compare/7.20.1...8.6.0)
2730

2831
## 5.4.0
2932

integration-test/cli.Tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ Describe 'MAUI' -ForEach @(
165165
'maui-app.pdb'
166166
)
167167
$result.ScriptOutput | Should -AnyElementMatch 'Uploaded a total of 1 new mapping files'
168-
$result.ScriptOutput | Should -AnyElementMatch 'Found 17 debug information files \(1 with embedded sources\)'
168+
$result.ScriptOutput | Should -AnyElementMatch 'Found 25 debug information files \(1 with embedded sources\)'
169169
}
170170

171171
It "uploads symbols and sources for an iOS build" -Skip:(!$IsMacOS) {

src/Sentry.Bindings.Android/Sentry.Bindings.Android.csproj

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
<TargetFrameworks>net8.0-android34.0</TargetFrameworks>
44
<!-- BG8605 and BG8606 happen because there's a missing androidx.lifecycle dependency, but we don't need it here. (The native Android Sentry SDK will use it if it exists.) -->
55
<NoWarn>$(NoWarn);BG8605;BG8606</NoWarn>
6-
<SentryAndroidSdkVersion>7.20.1</SentryAndroidSdkVersion>
6+
<SentryAndroidSdkVersion>8.6.0</SentryAndroidSdkVersion>
77
<SentryAndroidSdkDirectory>$(BaseIntermediateOutputPath)sdks\Sentry\Android\$(SentryAndroidSdkVersion)\</SentryAndroidSdkDirectory>
8+
<!-- This gets resolved by the DownloadSentryAndroidSdk target -->
9+
<SentryNativeNdkVersion></SentryNativeNdkVersion>
810
<Description>.NET Bindings for the Sentry Android SDK</Description>
911
</PropertyGroup>
1012

@@ -59,6 +61,33 @@
5961
Condition="!Exists('$(SentryAndroidSdkDirectory)sentry-$(SentryAndroidSdkVersion).jar')"
6062
Retries="3"
6163
/>
64+
<!-- The native-ndk exists outside of the android-ndk now. We're downloading the POM file to get the version of the native-ndk. -->
65+
<DownloadFile
66+
SourceUrl="https://repo1.maven.org/maven2/io/sentry/sentry-android-ndk/$(SentryAndroidSdkVersion)/sentry-android-ndk-$(SentryAndroidSdkVersion).pom"
67+
DestinationFolder="$(SentryAndroidSdkDirectory)"
68+
Condition="!Exists('$(SentryAndroidSdkDirectory)sentry-android-ndk-$(SentryAndroidSdkVersion).pom')"
69+
Retries="3"
70+
/>
71+
72+
<XmlPeek
73+
XmlInputPath="$(SentryAndroidSdkDirectory)sentry-android-ndk-$(SentryAndroidSdkVersion).pom"
74+
Query="//*[local-name()='dependency' and .//*[local-name()='artifactId' and text()='sentry-native-ndk']]/*[local-name()='version']/text()"
75+
Condition="Exists('$(SentryAndroidSdkDirectory)sentry-android-ndk-$(SentryAndroidSdkVersion).pom')">
76+
<Output TaskParameter="Result" PropertyName="SentryNativeNdkVersion" />
77+
</XmlPeek>
78+
79+
<DownloadFile
80+
SourceUrl="https://repo1.maven.org/maven2/io/sentry/sentry-native-ndk/$(SentryNativeNdkVersion)/sentry-native-ndk-$(SentryNativeNdkVersion).aar"
81+
DestinationFolder="$(SentryAndroidSdkDirectory)"
82+
Condition="'$(SentryNativeNdkVersion)' != '' And !Exists('$(SentryAndroidSdkDirectory)sentry-native-ndk-$(SentryNativeNdkVersion).aar')"
83+
Retries="3"
84+
/>
85+
86+
<!-- Since we're reading the version from the POM file, we need to create an item for the downloaded sentry-native-ndk -->
87+
<ItemGroup Condition="'$(SentryNativeNdkVersion)' != ''">
88+
<AndroidLibrary Include="$(SentryAndroidSdkDirectory)sentry-native-ndk-$(SentryNativeNdkVersion).aar" />
89+
</ItemGroup>
6290
</Target>
6391

92+
<UsingTask TaskName="XmlPeek" AssemblyName="Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
6493
</Project>

src/Sentry.Bindings.Android/Transforms/Metadata.xml

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,27 @@
6464
<attr path="/api/package[@name='io.sentry']/interface[@name='ObjectReader']/method[@name='dateOrNull']" name="visibility">internal</attr>
6565

6666

67-
<!-- Fix missing compareTo(Object) methods on classes extending SentryDate. -->
67+
<!-- Fix missing compareTo(Object) methods on classes extending SentryDate. -->
6868
<add-node path="/api/package[@name='io.sentry']/class[@extends='io.sentry.SentryDate']">
6969
<method name="compareTo" return="int" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public">
7070
<parameter name="p0" type="java.lang.Object" />
7171
</method>
7272
</add-node>
7373

74+
<!-- Fix missing compareTo(Object) method for EventProcessorAndOrder-->
75+
<add-node path="/api/package[@name='io.sentry.internal.eventprocessor']/class[@name='EventProcessorAndOrder']">
76+
<method name="compareTo" return="int" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public">
77+
<parameter name="p0" type="java.lang.Object" />
78+
</method>
79+
</add-node>
80+
81+
<!-- Fix missing compareTo(Object) method for Breadcrumb -->
82+
<add-node path="/api/package[@name='io.sentry']/class[@name='Breadcrumb']">
83+
<method name="compareTo" return="int" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public">
84+
<parameter name="p0" type="java.lang.Object" />
85+
</method>
86+
</add-node>
87+
7488
<!--
7589
TODO: If we need this, figure out how to multi-target or late bind.
7690
This API uses FrameMetrics, which requires Android >= 24.0. We currently target Android >= 21.0 which is the minimum supported by MAUI.
@@ -79,6 +93,13 @@
7993
<remove-node path="/api/package[@name='io.sentry.android.core.internal.util']/*[starts-with(@name,'SentryFrameMetricsCollector')]" />
8094
<remove-node path="/api/package[@name='io.sentry.android.core']/class[@name='AndroidProfiler']/*" />
8195

96+
<!-- Remove problematic classes for profiling that create a stack overflow during code generation, which appears as:
97+
error MSB6006: "dotnet" exited with code 134
98+
-->
99+
<remove-node path="/api/package[@name='io.sentry']/class[@name='ProfileChunk']" />
100+
<remove-node path="/api/package[@name='io.sentry']/class[@name='ProfilingTraceData']" />
101+
<remove-node path="/api/package[@name='io.sentry.android.core']/class[@name='AndroidProfiler']" />
102+
82103
<!--
83104
The BackfillingEventProcessor interface creates a stack overflow during code generation, which appears as:
84105
error MSB6006: "dotnet" exited with code 134
@@ -87,7 +108,7 @@
87108
-->
88109
<remove-node path="/api/package[@name='io.sentry']/interface[@name='BackfillingEventProcessor']" />
89110
<remove-node path="/api/package[@name='io.sentry.android.core']/class[@name='AnrV2EventProcessor']" />
90-
111+
91112
<!--
92113
SentryEvent.serialize() expects an parameter which implements IObjectWriter.
93114
JsonObjectWriter implements IObjectWriter in Java, but somehow this is not reflected in the generated binding.
@@ -115,17 +136,23 @@
115136
<remove-node path="/api/package[@name='io.sentry']/class[@name='OutboxSender']" />
116137
<remove-node path="/api/package[@name='io.sentry.cache']/class[@name='EnvelopeCache']" />
117138
<remove-node path="/api/package[@name='io.sentry.android.core.cache']/class[@name='AndroidEnvelopeCache']" />
118-
<remove-node path="/api/package[@name='io.sentry.android.core']/class[@name='TempSensorBreadcrumbsIntegration']" />
119139
<remove-node path="/api/package[@name='io.sentry.android.core.internal.gestures']" />
120140
<remove-node path="/api/package[@name='io.sentry.android.core.performance']" />
121141

122142
<remove-node path="/api/package[starts-with(@name,'io.sentry')]/*/method[@name='clone' and count(parameter)=0]" />
123143
<remove-node path="/api/package[starts-with(@name,'io.sentry')]/class/implements[@name='io.sentry.JsonDeserializer']" />
124-
<remove-node path="/api/package[@name='io.sentry.vendor.gson.stream']/class[@name='JsonToken']/field[@name='NAME']" />>
144+
<remove-node path="/api/package[@name='io.sentry.vendor.gson.stream']/class[@name='JsonToken']/field[@name='NAME']" />
125145

126146
<remove-node path="/api/package[@name='io.sentry.exception']/class[@name='ExceptionMechanismException']" />
127147
<remove-node path="/api/package[@name='io.sentry.exception']/class[@name='InvalidSentryTraceHeaderException']" />
128148
<remove-node path="/api/package[@name='io.sentry.exception']/class[@name='SentryEnvelopeException']" />
129149
<remove-node path="/api/package[@name='io.sentry.exception']/class[@name='SentryHttpClientException']" />
130150
<remove-node path="/api/package[@name='io.sentry.vendor.gson.stream']/class[@name='MalformedJsonException']" />
151+
152+
<!-- Remove CombinedContextsView.PutAll method due to conflicts when attempting to overwrite a method with the same name. -->
153+
<remove-node path="/api/package[@name='io.sentry']/class[@name='CombinedContextsView']/method[@name='putAll']" />
154+
<!-- Remove ISentryLifecycleToken.Close method due to conflicts with IAutoCloseable.Close due to having the same name. -->
155+
<remove-node path="/api/package[@name='io.sentry']/interface[@name='ISentryLifecycleToken']/method[@name='close']" />
156+
<!-- Remove QueueFile. The `.iterator` method has nullability issues -->
157+
<remove-node path="/api/package[@name='io.sentry.cache.tape']/class[@name='QueueFile']" />
131158
</metadata>

0 commit comments

Comments
 (0)