Skip to content

fix: Build modification caching #1379

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

Merged
merged 3 commits into from
Jun 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### Fixes

- Fixed an Android build issue where Sentry options would be cached with the first build until Editor restart ([#1379](https://github.com/getsentry/sentry-unity/pull/1379))
- Adding a remote repository filter to the gradle project ([#1367](https://github.com/getsentry/sentry-unity/pull/1367))
- Suspending Android native support for Mono builds to prevent C# exceptions form causing crashes ([#1362](https://github.com/getsentry/sentry-unity/pull/1362))
- Fixed an issue where the debug image UUID normalization would malform the UUID leading to a failed symbolication ([#1361](https://github.com/getsentry/sentry-unity/pull/1361))
Expand Down
15 changes: 11 additions & 4 deletions src/Sentry.Unity.Editor/Android/AndroidManifestConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,17 @@
namespace Sentry.Unity.Editor.Android
{
// https://github.com/getsentry/sentry-java/blob/d3764bfc97eed22564a1e23ba96fa73ad2685498/sentry-android-core/src/main/java/io/sentry/android/core/ManifestMetadataReader.java#L83-L217
public class AndroidManifestConfiguration : IPostGenerateGradleAndroidProject
public class PostGenerateGradleAndroidProject : IPostGenerateGradleAndroidProject
{
public int callbackOrder { get; } = 1;
public void OnPostGenerateGradleAndroidProject(string basePath)
{
var androidManifestConfiguration = new AndroidManifestConfiguration();
androidManifestConfiguration.OnPostGenerateGradleAndroidProject(basePath);
}
}

public class AndroidManifestConfiguration
{
private readonly SentryUnityOptions? _options;
private readonly SentryCliOptions? _sentryCliOptions;
Expand All @@ -21,9 +31,6 @@ public class AndroidManifestConfiguration : IPostGenerateGradleAndroidProject
private readonly bool _isDevelopmentBuild;
private readonly ScriptingImplementation _scriptingImplementation;

// Lower levels are called first.
public int callbackOrder => 1;

public AndroidManifestConfiguration()
: this(
SentryScriptableObject.ConfiguredBuildTimeOptions,
Expand Down