Migrate from sentry-android-gradle-plugin 2.x to 3.0.0
Learn about migrating from Sentry Android Gradle Plugin 2.x to 3.0.0.
The io.sentry.android.gradle >= 3.0.0 requires Android Gradle Plugin >= 7.0.0. For older versions of the Android Gradle Plugin, use io.sentry.android.gradle:2.+.
The autoUpload flag has been deprecated in favor of two new options:
includeProguardMapping- Disables/enables Proguard mapping functionality. When enabled, generates a UUID and attempts to upload a Proguard mapping associated with that UUID to Sentry. WhenautoUploadProguardMappingis disabled, the plugin will only generate asentry-debug-meta.propertiesfile containing UUID, which can later be used to manually upload the mapping using, for example sentry-cli.autoUploadProguardMapping- Defines whether the gradle plugin should attempt to auto-upload the mapping file to Sentry. WhenincludeProguardMappingis disabled, this flag has no effect.
Old:
Copied
sentry {
autoUpload = false
}
New:
Copied
sentry {
includeProguardMapping = true
autoUploadProguardMapping = false
}
The io.sentry.android.gradle enables the tracing instrumentation (via bytecode manipulation) for androidx.sqlite and androidx.room libraries by default, to disable it, see the code snippet below.
Copied
sentry {
// Enable or disable the tracing instrumentation.
// Does auto instrumentation for 'androidx.sqlite' and 'androidx.room' libraries.
// It starts and finishes a Span within any CRUD operation.
// Default is enabled.
// Only available v3.0.0 and above.
tracingInstrumentation {
enabled = false
}
}
Was this helpful?
Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").