Skip to content

Commit

Permalink
Hook to bundle tasks during Android export for symbols upload (#1692)
Browse files Browse the repository at this point in the history
  • Loading branch information
munkiki7 authored Jun 18, 2024
1 parent 704bcbc commit b8f9f8e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@

- Added an `IgnoreCliErrors` to the Sentry-CLI options, allowing you to ignore errors during symbol and mapping upload ([#1687](https://github.com/getsentry/sentry-unity/pull/1687))

### Fixes

- When exporting Android projects, the SDK will now correctly add the symbol upload at the end of bundling ([#1692](https://github.com/getsentry/sentry-unity/pull/1692))

### Dependencies

- Bump Cocoa SDK from v8.27.0 to v8.29.0 ([#1685](https://github.com/getsentry/sentry-unity/pull/1685), [#1690](https://github.com/getsentry/sentry-unity/pull/1690))
Expand Down
7 changes: 7 additions & 0 deletions src/Sentry.Unity.Editor/Android/DebugSymbolUpload.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,13 @@ private string _symbolUploadTaskFormat
stringBuilder.AppendLine(string.Empty);
stringBuilder.AppendLine("tasks.assembleDebug.finalizedBy sentryUploadSymbols");
stringBuilder.AppendLine("tasks.assembleRelease.finalizedBy sentryUploadSymbols");

if (_isExporting)
{
stringBuilder.AppendLine("tasks.bundleDebug.finalizedBy sentryUploadSymbols");
stringBuilder.AppendLine("tasks.bundleRelease.finalizedBy sentryUploadSymbols");
}

stringBuilder.AppendLine("}");
return stringBuilder.ToString();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,11 @@ public void AppendUploadToGradleFile_AllRequirementsMet_AppendsUploadTask(bool i
{
keywords.Add("logFilePath");
}
else
{
keywords.Add("tasks.bundleDebug.finalizedBy sentryUploadSymbols");
keywords.Add("tasks.bundleRelease.finalizedBy sentryUploadSymbols");
}

if (!isExporting && ignoreCliErrors)
{
Expand Down

0 comments on commit b8f9f8e

Please sign in to comment.