From fb38613489d903d2c00832749f983842bc517535 Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Tue, 10 Sep 2024 16:17:05 +0300 Subject: [PATCH 1/8] Upgrade Android gradle plugin --- plugin-dev/Config/FilterPlugin.ini | 7 +------ plugin-dev/Gradle/gradle-wrapper.properties | 5 +++++ plugin-dev/Source/Sentry/Sentry_Android_UPL.xml | 8 ++++++-- 3 files changed, 12 insertions(+), 8 deletions(-) create mode 100644 plugin-dev/Gradle/gradle-wrapper.properties diff --git a/plugin-dev/Config/FilterPlugin.ini b/plugin-dev/Config/FilterPlugin.ini index 3f8d729b..3980bb1b 100644 --- a/plugin-dev/Config/FilterPlugin.ini +++ b/plugin-dev/Config/FilterPlugin.ini @@ -7,10 +7,5 @@ ; /Extras/... ; /Binaries/ThirdParty/*.dll /Scripts/* -/LinuxIntermediate/Build/Linux/UnrealEditor/Inc/Sentry/UHT/* -/LinuxIntermediate/Build/Linux/UnrealGame/Development/Sentry/* -/LinuxIntermediate/Build/Linux/UnrealGame/Inc/Sentry/UHT/* -/LinuxIntermediate/Build/Linux/UnrealGame/Shipping/Sentry/* -/LinuxIntermediate/Build/Linux/x64/UnrealGame/Development/Sentry/* -/LinuxIntermediate/Build/Linux/x64/UnrealGame/Shipping/Sentry/* +/Gradle/* /sentry-cli.properties \ No newline at end of file diff --git a/plugin-dev/Gradle/gradle-wrapper.properties b/plugin-dev/Gradle/gradle-wrapper.properties new file mode 100644 index 00000000..3c472b99 --- /dev/null +++ b/plugin-dev/Gradle/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip diff --git a/plugin-dev/Source/Sentry/Sentry_Android_UPL.xml b/plugin-dev/Source/Sentry/Sentry_Android_UPL.xml index 6f26370f..54039137 100644 --- a/plugin-dev/Source/Sentry/Sentry_Android_UPL.xml +++ b/plugin-dev/Source/Sentry/Sentry_Android_UPL.xml @@ -36,6 +36,7 @@ + @@ -67,6 +68,9 @@ apply plugin: 'io.sentry.android.gradle' sentry { + autoInstallation { + enabled = false + } uploadNativeSymbols = true } @@ -137,7 +141,7 @@ dependencies { - classpath 'com.android.tools.build:gradle:3.5.4' + classpath 'com.android.tools.build:gradle:7.4.2' } @@ -147,7 +151,7 @@ dependencies { - classpath 'io.sentry:sentry-android-gradle-plugin:2.1.5' + classpath 'io.sentry:sentry-android-gradle-plugin:4.11.0' } From a15d8177116a0e2e98418d526d5fc153ec79ae69 Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Tue, 10 Sep 2024 16:27:46 +0300 Subject: [PATCH 2/8] Update package snapshot --- scripts/packaging/package-github.snapshot | 2 ++ scripts/packaging/package-marketplace.snapshot | 2 ++ 2 files changed, 4 insertions(+) diff --git a/scripts/packaging/package-github.snapshot b/scripts/packaging/package-github.snapshot index 4c1c16bc..0ce336d8 100644 --- a/scripts/packaging/package-github.snapshot +++ b/scripts/packaging/package-github.snapshot @@ -1,6 +1,8 @@ CHANGELOG.md Config/ Config/FilterPlugin.ini +Gradle/ +Gradle/gradle-wrapper.properties LICENSE Resources/ Resources/Icon128.png diff --git a/scripts/packaging/package-marketplace.snapshot b/scripts/packaging/package-marketplace.snapshot index 373a9ca3..778a2d06 100644 --- a/scripts/packaging/package-marketplace.snapshot +++ b/scripts/packaging/package-marketplace.snapshot @@ -1,6 +1,8 @@ CHANGELOG.md Config/ Config/FilterPlugin.ini +Gradle/ +Gradle/gradle-wrapper.properties LICENSE Resources/ Resources/Icon128.png From 40f7e8c1a72b0e6498bacb3d5168d4cafb914d40 Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Tue, 10 Sep 2024 16:29:39 +0300 Subject: [PATCH 3/8] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 98656373..6f324cf6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Add setting that allows switching between the project and user directories for the internal Sentry database location on Windows/Linux ([#616](https://github.com/getsentry/sentry-unreal/pull/616)) - Add non-ASCII characters support for user messages ([#624](https://github.com/getsentry/sentry-unreal/pull/624)) +- Upgrade Android gradle plugin ([#633](https://github.com/getsentry/sentry-unreal/pull/633)) ### Fixes From f00f3b5db39dc0bedd0332f514753ed91199aa47 Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Tue, 10 Sep 2024 17:39:57 +0300 Subject: [PATCH 4/8] Update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f324cf6..250a39a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ - Add setting that allows switching between the project and user directories for the internal Sentry database location on Windows/Linux ([#616](https://github.com/getsentry/sentry-unreal/pull/616)) - Add non-ASCII characters support for user messages ([#624](https://github.com/getsentry/sentry-unreal/pull/624)) -- Upgrade Android gradle plugin ([#633](https://github.com/getsentry/sentry-unreal/pull/633)) +- Upgrade Android gradle plugin from v2.1.5 to v4.11.0 ([#633](https://github.com/getsentry/sentry-unreal/pull/633)) ### Fixes From dd531a2d25b1e49c5ec58abe18babf3f2a94a50e Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Tue, 24 Sep 2024 10:21:54 +0300 Subject: [PATCH 5/8] Add setting allowing to switch back to legacy Sentry gradle plugin --- .../Source/Sentry/Private/SentrySettings.cpp | 1 + .../Source/Sentry/Public/SentrySettings.h | 5 +++ .../Source/Sentry/Sentry_Android_UPL.xml | 40 ++++++++++++------- 3 files changed, 32 insertions(+), 14 deletions(-) diff --git a/plugin-dev/Source/Sentry/Private/SentrySettings.cpp b/plugin-dev/Source/Sentry/Private/SentrySettings.cpp index b5f65435..a9d0338d 100644 --- a/plugin-dev/Source/Sentry/Private/SentrySettings.cpp +++ b/plugin-dev/Source/Sentry/Private/SentrySettings.cpp @@ -38,6 +38,7 @@ USentrySettings::USentrySettings(const FObjectInitializer& ObjectInitializer) , UploadSymbolsAutomatically(false) , IncludeSources(false) , DiagnosticLevel(ESentryCliLogLevel::Info) + , UseLegacyGradlePlugin(false) , CrashReporterUrl() , bIsDirty(false) { diff --git a/plugin-dev/Source/Sentry/Public/SentrySettings.h b/plugin-dev/Source/Sentry/Public/SentrySettings.h index 87514253..3ad9c702 100644 --- a/plugin-dev/Source/Sentry/Public/SentrySettings.h +++ b/plugin-dev/Source/Sentry/Public/SentrySettings.h @@ -364,6 +364,11 @@ class SENTRY_API USentrySettings : public UObject Meta = (DisplayName = "Diagnostic Level", ToolTip = "Logs verbosity level during symbol uploading.", EditCondition = "UploadSymbolsAutomatically")) ESentryCliLogLevel DiagnosticLevel; + UPROPERTY(Config, EditAnywhere, Category = "Debug Symbols", + Meta = (DisplayName = "Use legacy Sentry Gradle plugin (for Android only)", ToolTip = "Flag indicating whether to use legacy Sentry Gradle plugin for debug symbol upload. No engine's Gradle version bump is required if enabled, otherwise Gradle 7.5 will be used which might cause compatibility issue with other third-party plugins.", + EditCondition = "UploadSymbolsAutomatically")) + bool UseLegacyGradlePlugin; + UPROPERTY(Config, EditAnywhere, Category = "Crash Reporter", Meta = (DisplayName = "Crash Reporter Endpoint", ToolTip = "Endpoint that Unreal Engine Crah Reporter should use in order to upload crash data to Sentry.")) FString CrashReporterUrl; diff --git a/plugin-dev/Source/Sentry/Sentry_Android_UPL.xml b/plugin-dev/Source/Sentry/Sentry_Android_UPL.xml index 54039137..1a937e1e 100644 --- a/plugin-dev/Source/Sentry/Sentry_Android_UPL.xml +++ b/plugin-dev/Source/Sentry/Sentry_Android_UPL.xml @@ -5,6 +5,7 @@ + @@ -34,9 +35,14 @@ + + + + + + - @@ -138,22 +144,28 @@ - - - dependencies { - classpath 'com.android.tools.build:gradle:7.4.2' - } - - - - - dependencies { - classpath 'io.sentry:sentry-android-gradle-plugin:4.11.0' - } - + + + + + dependencies { + classpath 'io.sentry:sentry-android-gradle-plugin:2.1.5' + } + + + + + + dependencies { + classpath 'com.android.tools.build:gradle:7.4.2' + classpath 'io.sentry:sentry-android-gradle-plugin:4.11.0' + } + + + From d2b44a4a469a4da6783da5e819222013c18c0c5e Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Tue, 24 Sep 2024 11:20:28 +0300 Subject: [PATCH 6/8] Fix packaging error --- .../Source/Sentry/Private/SentrySettings.cpp | 1 + plugin-dev/Source/Sentry/Sentry_Android_UPL.xml | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/plugin-dev/Source/Sentry/Private/SentrySettings.cpp b/plugin-dev/Source/Sentry/Private/SentrySettings.cpp index a9d0338d..10f1a715 100644 --- a/plugin-dev/Source/Sentry/Private/SentrySettings.cpp +++ b/plugin-dev/Source/Sentry/Private/SentrySettings.cpp @@ -67,6 +67,7 @@ void USentrySettings::PostEditChangeProperty(FPropertyChangedEvent& PropertyChan PropertyChangedEvent.Property->GetFName() == GET_MEMBER_NAME_CHECKED(USentrySettings, OrgName) || PropertyChangedEvent.Property->GetFName() == GET_MEMBER_NAME_CHECKED(USentrySettings, AuthToken) || PropertyChangedEvent.Property->GetFName() == GET_MEMBER_NAME_CHECKED(USentrySettings, IncludeSources) || + PropertyChangedEvent.Property->GetFName() == GET_MEMBER_NAME_CHECKED(USentrySettings, UseLegacyGradlePlugin) || PropertyChangedEvent.Property->GetFName() == GET_MEMBER_NAME_CHECKED(USentrySettings, DiagnosticLevel) || PropertyChangedEvent.Property->GetFName() == GET_MEMBER_NAME_CHECKED(USentrySettings, CrashReporterUrl)) { diff --git a/plugin-dev/Source/Sentry/Sentry_Android_UPL.xml b/plugin-dev/Source/Sentry/Sentry_Android_UPL.xml index 1a937e1e..e8bab642 100644 --- a/plugin-dev/Source/Sentry/Sentry_Android_UPL.xml +++ b/plugin-dev/Source/Sentry/Sentry_Android_UPL.xml @@ -74,12 +74,20 @@ apply plugin: 'io.sentry.android.gradle' sentry { - autoInstallation { - enabled = false - } uploadNativeSymbols = true } + + + + sentry { + autoInstallation { + enabled = false + } + } + + + @@ -88,7 +96,7 @@ } - + From a7ceca4dd7d838116767b87f9bf36f247cce2f43 Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Tue, 24 Sep 2024 11:34:13 +0300 Subject: [PATCH 7/8] Update tooltip --- plugin-dev/Source/Sentry/Public/SentrySettings.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin-dev/Source/Sentry/Public/SentrySettings.h b/plugin-dev/Source/Sentry/Public/SentrySettings.h index 3ad9c702..9dc921e3 100644 --- a/plugin-dev/Source/Sentry/Public/SentrySettings.h +++ b/plugin-dev/Source/Sentry/Public/SentrySettings.h @@ -365,7 +365,7 @@ class SENTRY_API USentrySettings : public UObject ESentryCliLogLevel DiagnosticLevel; UPROPERTY(Config, EditAnywhere, Category = "Debug Symbols", - Meta = (DisplayName = "Use legacy Sentry Gradle plugin (for Android only)", ToolTip = "Flag indicating whether to use legacy Sentry Gradle plugin for debug symbol upload. No engine's Gradle version bump is required if enabled, otherwise Gradle 7.5 will be used which might cause compatibility issue with other third-party plugins.", + Meta = (DisplayName = "Use legacy Sentry Gradle plugin (for Android only)", ToolTip = "Flag indicating whether to use legacy Sentry Gradle plugin for debug symbol upload. No engine's Gradle version bump is required if enabled. This can be used as a fallback if the newer Gradle 7.5 causing compatibility issues with other third-party plugins.", EditCondition = "UploadSymbolsAutomatically")) bool UseLegacyGradlePlugin; From 62fd23680ad5e2af5234d5abfc1a75031ea79d4a Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Tue, 24 Sep 2024 15:59:05 +0300 Subject: [PATCH 8/8] Update logs --- plugin-dev/Source/Sentry/Sentry_Android_UPL.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugin-dev/Source/Sentry/Sentry_Android_UPL.xml b/plugin-dev/Source/Sentry/Sentry_Android_UPL.xml index e8bab642..af04dc1d 100644 --- a/plugin-dev/Source/Sentry/Sentry_Android_UPL.xml +++ b/plugin-dev/Source/Sentry/Sentry_Android_UPL.xml @@ -157,15 +157,17 @@ - + dependencies { + classpath 'com.android.tools.build:gradle:3.5.4' classpath 'io.sentry:sentry-android-gradle-plugin:2.1.5' } - + + dependencies { classpath 'com.android.tools.build:gradle:7.4.2'