Skip to content

Commit 4792ac3

Browse files
authored
Sentry crash on Android release - fix (#646)
* Proguard file updated to prevent crash on release * Fix workload version for android * Tracing disabled * Sentry updated * Fix workload version for android reverted
1 parent 1877701 commit 4792ac3

File tree

6 files changed

+11
-17
lines changed

6 files changed

+11
-17
lines changed

BMM.Core/BMM.Core.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<PackageReference Include="MvvmCross.Plugin.JsonLocalization" Version="9.2.0" />
2323
<PackageReference Include="MvvmCross.Plugin.Messenger" Version="9.2.0" />
2424
<PackageReference Include="MvvmCross.Plugin.Visibility" Version="9.2.0" />
25-
<PackageReference Include="Sentry" Version="5.0.0" />
25+
<PackageReference Include="Sentry" Version="5.0.1" />
2626
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.34.0" />
2727
<PackageReference Include="TagLibSharp" Version="2.3.0" />
2828
<PackageReference Update="Microsoft.Maui.Graphics" Version="8.0.80" />

BMM.UI.Android/AndroidSetup.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
using FFImageLoading;
5959
using FFImageLoading.Cache;
6060
using FFImageLoading.Config;
61+
using Firebase;
6162
using Google.Android.Material.FloatingActionButton;
6263
using Google.Android.Material.Navigation;
6364
using IdentityModel.OidcClient.Browser;
@@ -156,7 +157,7 @@ protected override void InitializeFirstChance(IMvxIoCProvider iocProvider)
156157
var stopwatch = iocProvider.Resolve<IStopwatchManager>();
157158
stopwatch.StartAndGetStopwatch(StopwatchType.AppStart);
158159

159-
Firebase.FirebaseApp.InitializeApp(ApplicationContext);
160+
FirebaseApp.InitializeApp(ApplicationContext);
160161

161162
iocProvider.RegisterType<INotificationSubscriptionTokenProvider, FirebaseTokenProvider>();
162163
#if DEBUG

BMM.UI.Android/BMM.UI.Droid.csproj

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<PackageReference Include="MvvmCross.DroidX.SwipeRefreshLayout" Version="9.2.0" />
2929
<PackageReference Include="MvvmCross.Plugin.Color" Version="9.2.0" />
3030
<PackageReference Include="MvvmCross.Plugin.JsonLocalization" Version="9.2.0" />
31-
<PackageReference Include="Sentry" Version="5.0.0" />
31+
<PackageReference Include="Sentry" Version="5.0.1" />
3232
<PackageReference Include="Serilog.Extensions.Logging" Version="8.0.0" />
3333
<PackageReference Include="XAB.FlexboxLayout" Version="3.0.0.2" />
3434
<PackageReference Include="Xam.Plugins.Android.ExoPlayer" Version="2.19.1" />
@@ -1097,8 +1097,7 @@
10971097
</AndroidResource>
10981098
</ItemGroup>
10991099
<ItemGroup>
1100-
<None Remove="google-services.json" />
1101-
<GoogleServicesJson Include="google-services.json" />
1100+
<GoogleServicesJson Include="google-services.json" LogicalName="google-services.json" />
11021101
</ItemGroup>
11031102
<ItemGroup>
11041103
<Content Include="Application\.DS_Store" />

BMM.UI.Android/proguard.cfg

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,13 @@
1111
-keep class androidx.viewpager.widget.** { *; }
1212
-keep class androidx.core.graphics.** { *; }
1313
-keep class androidx.browser.customtabs.** { *; }
14+
-keep class androidx.appcompat.widget.** { *; }
1415
-dontwarn androidx.recyclerview.widget.**
1516

1617
-keep class com.google.android.gms.** { *; }
1718
-keep class com.google.firebase.** { *; }
1819
-keep class com.google.android.material.navigation.** { *; }
1920
-keep class com.microsoft.appcenter.** { *; }
20-
-dontwarn com.google.android.gms.**
21+
-dontwarn com.google.android.gms.**
22+
23+
-keep public class com.google.android.material.internal.BaselineLayout

BMM.UI.iOS/BMM.UI.iOS.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@
598598
<PackageReference Include="MvvmCross" Version="9.2.0" />
599599
<PackageReference Include="MvvmCross.Plugin.Color" Version="9.2.0" />
600600
<PackageReference Include="MvvmCross.Plugin.JsonLocalization" Version="9.2.0" />
601-
<PackageReference Include="Sentry" Version="5.0.0" />
601+
<PackageReference Include="Sentry" Version="5.0.1" />
602602
<PackageReference Include="Serilog" Version="4.0.1" />
603603
<PackageReference Include="Serilog.Extensions.Logging" Version="8.0.0" />
604604
<PackageReference Include="Xamarin.Firebase.iOS.CloudMessaging" Version="8.10.0.3" />

azure-pipelines-android.yaml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
pool:
22
name: Azure Pipelines
3-
vmImage: 'windows-2022'
3+
vmImage: 'macOS-13'
44
demands:
5-
- npm
65
- msbuild
7-
- MSBuild
8-
- JDK
96

107
trigger:
118
branches:
@@ -19,12 +16,6 @@ variables:
1916
branchName: $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '') ]
2017

2118
steps:
22-
- task: JavaToolInstaller@0
23-
displayName: 'Use Java 21'
24-
inputs:
25-
versionSpec: 21
26-
jdkArchitectureOption: x64
27-
jdkSourceOption: PreInstalled
2819
- bash: |
2920
dotnet workload install android
3021
displayName: 'Install Android workload'

0 commit comments

Comments
 (0)