Version 4 of the Sentry Android Gradle plugin brings a variety of features and fixes. The most notable changes are:
- Bump Sentry Android SDK to
7.0.0
. Please, refer to the changelog of the SDK for more details - Rename
experimentalGuardsquareSupport
flag todexguardEnabled
- Add new
excludes
option to allow excluding certain classes from instrumentation. It's available under thesentry.tracingInstrumentation
extension
Sentry Android SDK Compatibility
Make sure to use Sentry Gradle plugin 4.+ together with the Sentry Android SDK 7.+, otherwise it might crash at runtime due to binary incompatibility. (E.g. if you're using -timber
, -okhttp
or other packages)
If you can't do that for some reason, you can specify sentry version via the plugin config block:
sentry {
autoInstallation {
sentryVersion.set("7.0.0")
}
}
Similarly, if you have a Sentry SDK (e.g. sentry-android-core
) dependency on one of your Gradle modules and you're updating it to 7.+, make sure the Gradle plugin is at 4.+ or specify the SDK version as shown in the snippet above.
Breaking Changes
- Rename
experimentalGuardsquareSupport
flag todexguardEnabled
(#589) - Bump Sentry Android SDK to
7.0.0
Other Changes
Features
- Print a warning if the Sentry plugin is not applied on the app module (#586)
- Add new
excludes
option to exclude classes from instrumentation (#590) - Send telemetry data for plugin usage (#582)
- This will collect errors and timings of the plugin and its tasks (anonymized, except the sentry org id), so we can better understand how the plugin is performing. If you wish to opt-out of this behavior, set
telemetry = false
in thesentry
plugin configuration block.
- This will collect errors and timings of the plugin and its tasks (anonymized, except the sentry org id), so we can better understand how the plugin is performing. If you wish to opt-out of this behavior, set
Chores
- Change cli command from
upload-dif
todebug-files upload
for native symbols (#587) - Use new AGP api for native symbols upload (#592)