Skip to content
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

Upgrade Android gradle plugin #633

Merged
merged 10 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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 @@ -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))
tustanivsky marked this conversation as resolved.
Show resolved Hide resolved

### Fixes

Expand Down
7 changes: 1 addition & 6 deletions plugin-dev/Config/FilterPlugin.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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/*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that change intentional? The how do the LinuxIntermediate related to Gradle?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, aside from adding Gradle here I've also removed LinuxIntermediate stuff which is now redundant (probably I've missed deleting these entries earlier). Should we tackle this kind of clean-up in a separate PR?

/sentry-cli.properties
5 changes: 5 additions & 0 deletions plugin-dev/Gradle/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
8 changes: 6 additions & 2 deletions plugin-dev/Source/Sentry/Sentry_Android_UPL.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
<copyFile src="$S(ProjectDir)/sentry.properties" dst="$S(BuildDir)/gradle/AFSProject/app/sentry.properties" />
</true>
</if>
<copyFile src="$S(PluginDir)/../../Gradle/gradle-wrapper.properties" dst="$S(BuildDir)/gradle/gradle/wrapper/gradle-wrapper.properties" />
</prebuildCopies>

<androidManifestUpdates>
Expand Down Expand Up @@ -67,6 +68,9 @@
apply plugin: 'io.sentry.android.gradle'

sentry {
autoInstallation {
enabled = false
}
uploadNativeSymbols = true
}
</insert>
Expand Down Expand Up @@ -137,7 +141,7 @@
<buildscriptGradleAdditions>
<insert>
dependencies {
classpath 'com.android.tools.build:gradle:3.5.4'
classpath 'com.android.tools.build:gradle:7.4.2'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's the gradle tool itself, right? And that's a requirement for the sentry-android-gradle-plugin 4.11.0?
Are we going to mess with user's build by messing with the gradle version that comes with the UE installation?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the io.sentry.android.gradle >= 3.0.0 requires Android Gradle Plugin >= 7.0.0 according to docs.
I've tested this with a few different engine versions (including pretty old UE 4.27) and the build was successful however there's always a chance that some compatibility issues with 3rd-party plugins can arise.

}
</insert>
</buildscriptGradleAdditions>
Expand All @@ -147,7 +151,7 @@
<true>
<insert>
dependencies {
classpath 'io.sentry:sentry-android-gradle-plugin:2.1.5'
classpath 'io.sentry:sentry-android-gradle-plugin:4.11.0'
}
</insert>
</true>
Expand Down
2 changes: 2 additions & 0 deletions scripts/packaging/package-github.snapshot
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
CHANGELOG.md
Config/
Config/FilterPlugin.ini
Gradle/
Gradle/gradle-wrapper.properties
LICENSE
Resources/
Resources/Icon128.png
Expand Down
2 changes: 2 additions & 0 deletions scripts/packaging/package-marketplace.snapshot
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
CHANGELOG.md
Config/
Config/FilterPlugin.ini
Gradle/
Gradle/gradle-wrapper.properties
LICENSE
Resources/
Resources/Icon128.png
Expand Down
Loading