- Invalidate instrumentation cache when changing instrumentation features (#753)
- Bump Android SDK from v7.13.0 to v7.15.0 (#754, #775)
- Bump CLI from v2.33.1 to v2.37.0 (#757, #761, #773)
- Fix plugin for spring-dependency-management 1.1.6 (#741)
- Make
SentryUploadNativeSymbolsTask
configuration-cache compatible (#747) - Fix
permission denied
error when extracting sentry-cli concurrently (#748) - Make
SentryGenerateProguardUuidTask
produce deterministic output based on the mapping file contents (#750)- This disables caching for the
SentryGenerateProguardUuidTask
task in favour of deterministic UUID generation. The task will always run but will always produce the same UUID for the same mapping file.
- This disables caching for the
-
Session Replay Public Beta (#3339)
The Gradle plugin pulls in the
io.sentry:sentry-android:7.12.0
dependency and enables Session Replay through it. To enable Replay use thesessionReplay.sessionSampleRate
orsessionReplay.errorSampleRate
experimental options.import io.sentry.SentryReplayOptions import io.sentry.android.core.SentryAndroid SentryAndroid.init(context) { options -> // Currently under experimental options: options.experimental.sessionReplay.sessionSampleRate = 1.0 // We suggest 0.1 in production (10% sessions sampled) options.experimental.sessionReplay.errorSampleRate = 1.0 // To change default redaction behavior (defaults to true) options.experimental.sessionReplay.redactAllImages = true options.experimental.sessionReplay.redactAllText = true // To change quality of the recording (defaults to MEDIUM) options.experimental.sessionReplay.quality = SentryReplayOptions.SentryReplayQuality.MEDIUM // (LOW|MEDIUM|HIGH) }
To learn more visit Sentry's Mobile Session Replay documentation page.
- Only apply Jetpack Compose instrumentation if
Modifier
class is available (#727)
- Auto install and instrument sentry-okhttp instead of sentry-android-okhttp on v7+ (#724)
- Fix source bundles with configuration cache on AGP 8+ (#725)
- Add missing copyFlutterAssets task dependency for Flutter (#723)
- Fix support for Kotlin K2 compiler plugin (#720)
- Add support for Kotlin K2 compiler plugin (#716)
- Do not include
BuildConfig
into source bundles (#705) - Fix misleading auth-token error message in case "sentry-cli info" fails (#708)
- Fix auth-token error for ProGuard mapping upload, even when mapping upload is disabled (fixed with sentry-cli 2.31.1)
- Remove excessive info logging (#696)
- Fix circular depencency issue between mergeAssets and minify tasks (#682)
- Fix sentry-cli not being extracted prior to task execution (#691)
- Do not pollute build classpath with groovy dependencies (#677)
- Ensure sentry-cli works well with configuration cache (#675)
- Fix circular task dependency in combination with DexGuard plugin (#678)
- Do not pollute build classpath with groovy dependencies (#660)
- Do not execute
minifyWithR8
task when running tests withisIncludeAndroidResources
enabled (#662) - Make tasks with reproducible inputs Cacheable (#664)
SentryGenerateIntegrationListTask
SentryGenerateDebugMetaPropertiesTask
GenerateBundleIdTask
SentryGenerateProguardUuidTask
- Bundle ASM version within the plugin and bump it to
9.4
(#637)- This should fix the
java.lang.AssertionError: Class with incorrect id found
exception when usingkotlinx.serialization
- This should fix the
- Fall back to
findTask
ifassembleProvider
of AndroidVariant is null when hooking source bundle and native symbols upload tasks (#639) - Hook source context tasks to also run after
install{Variant}
tasks (#643) - Do not run sentry-cli commands if telemetry is disabled (#648)
- Proguard and source context tasks don't run on every build (#634)
- Proguard UUID task now depends on the proguard mapping file. I.e. it will only run if the mapping file has changed
- Source context tasks now depend on source file changes, if there are no source changes, the tasks won't run
- Consider
sentry-bom
version when auto-installing integrations and the SDK (#625)
- Support Room kotlin codegen (#630)
- Make sentry-cli path calculation configuration-cache compatible (#631)
- This will prevent build from failing when e.g. switching branches with stale configuration cache
- Fix
FacebookInitProvider
instrumentation (#633)
- Fix VerifyError when optimized code is instrumented (#619)
- Do not consider user-defined sentry versions when auto-installing integrations. This is necessary because we want to align integrations versions to the same one as one of
sentry-android-core
/sentry
/sentry-android
/sentry-spring-boot
to prevent runtime crashes due to binary incompatibility. (#602)- If you have directly defined one of the core versions, we will use that to install integrations, otherwise
autoInstallation.sentryVersion
or the default bundled SDK version is used.
- If you have directly defined one of the core versions, we will use that to install integrations, otherwise
This means if you have defined something like that:
// direct deps
dependencies {
implementation("io.sentry:sentry-android-core:7.0.0")
implementation("io.sentry:sentry-android-okhttp:6.34.0")
}
// or with the gradle plugin
sentry {
autoInstallation.sentryVersion = '7.0.0' // or the latest version bundled within the plugin
}
dependencies {
implementation("io.sentry:sentry-android-okhttp:6.34.0")
}
Then in both cases it will use 7.0.0
when installing the sentry-android-okhttp
integration and print a warning that we have overridden the version.
-
Add aarch64 sentry-cli (#611)
- This is used when the build is executed inside a docker container on an Apple silicon chip (e.g. M1)
-
Instrument ContentProvider/Application onCreate calls to measure app-start performance (#565)
- This feature requires the
sentry-java
SDK version7.1.0
and is enabled by default - To disable the feature, set
sentry.tracingInstrumentation.appStart.enabled
tofalse
- This feature requires the
sentry {
tracingInstrumentation {
appStart {
enabled.set(false)
}
}
}
- Fix sentry-cli url parameter position (#610)
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
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.
- Rename
experimentalGuardsquareSupport
flag todexguardEnabled
(#589) - Bump Sentry Android SDK to
7.0.0
- 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
- Change cli command from
upload-dif
todebug-files upload
for native symbols (#587) - Use new AGP api for native symbols upload (#592)
- Bump Android SDK from v6.32.0 to v7.0.0 (#588, #593, #597)
- Bump CLI from v2.21.2 to v2.22.3 (#598, #600)
- Add
url
option which is passed through tosentry-cli
(#572)- In case you are self hosting Sentry, you can set
url
to your self hosted instance if your org auth token does not contain a URL
- In case you are self hosting Sentry, you can set
- Provide detailed message for failed sentry-cli API requests (#576)
- Use
spring-boot
instead ofspring-boot-starter
for auto install detection (#543) - Fix tracing instrumentation not working when configuration-cache is enabled on Gradle 8+ (#568)
- Fix source context not working with configuration cache enabled on Gradle 8+ (#570)
- Make proguard release association backward-compatible (#576)
- Auto install
sentry-quartz
ifquartz
is installed (#562)
- Change room span op name to
db.sql.room
(#557)
- Reduce log level from warn to info for some auto install messages (#553)
- There was some confusion especially around our Spring and Spring Boot integrations where we offer a different set of dependencies for Spring 5 (
sentry-spring
), Spring 6 (sentry-spring-jakarta
), Spring Boot 2 (sentry-spring-boot
) and Spring Boot 3 (sentry-spring-boot-jakarta
) where there's always going to be one that's installed and one that's not installed.
- There was some confusion especially around our Spring and Spring Boot integrations where we offer a different set of dependencies for Spring 5 (
- Bump CLI from v2.20.3 to v2.21.1 (#540, #545, #550, #556, #561)
- Bump Android SDK from v6.28.0 to v6.30.0 (#555, #563)
- Add release information args to proguard mapping upload task (#476)
- Requires Sentry version
>=23.7.2
if you're using self-hosted
- Requires Sentry version
- Auto install Sentry integrations for Java Backend, Desktop, etc. (#521)
- Use Spring Boot autoconfigure modules (
sentry-spring-boot
andsentry-spring-boot-jakarta
) for auto install (#542)
- Disable source context tasks if not enabled (#536)
- Bump CLI from v2.19.1 to v2.20.3 (#520, #531, #537)
- Bump Android SDK from v6.22.0 to v6.28.0 (#527, #528, #532, #541)
- Fixed OkHttpEventListener crash at runtime with OkHttp4 (#514)
- Add OkHttpEventListener automatically (#504)
- New Sqlite instrumentation (#502)
- This integration replaces the old database instrumentation with the
sentry-android-sqlite
integration - Any implementation of SupportSQLiteOpenHelper.Factory is now supported
- This integration replaces the old database instrumentation with the
- Rename
project
toprojectName
in SentryPluginExtension (#505) - No longer ignore
org
andprojectName
insentry
config block (#501)
- Create a new Sentry Gradle plugin with ID
io.sentry.jvm.gradle
for Java Backend, Desktop etc. (#495) - Source Context for Java (#495)
- To enable it apply the
io.sentry.jvm.gradle
plugin and setincludeSourceContext
totrue
- For more information on how to enable source context, please refer to #633
- To enable it apply the
- Allow setting sentry properties via the
sentry
plugin extension (#500)
- Bundle Java Sources and upload to Sentry (#472)
- For more information on how to enable source context, please refer to #633
- Requires Sentry version
>=23.5.0
if you're using self-hosted
- New
debug
option to enable debug logging for sentry-cli (#472)
- Add missing Kotlin Compiler Plugin Marker config (#488)
- Add Kotlin Compiler plugin to enrich Composable functions (#452)
- Do not transform the sdk name to Int in BootstrapAndroidSdk (#478)
- Bump Android SDK from v6.13.0 to v6.16.0 (#442, #449)
- Bump CLI from v2.12.0 to v2.15.2 (#439, #443, #446, #450)
- Fix failing room 2.5.0 instrumentation (#435)
- Fix AGP 7.4.0 incompatibility when merging assets (#431)
- Support configuration cache in dependencies report task from Gradle
7.5
onwards (#423)
- Do not register dependencies report task if it's disabled (#422)
- Ensure clean state before generating a new uuid by deleting the old
sentry-debug-meta.properties
file (#420)
- Bump Android SDK from v6.7.0 to v6.11.0 (#406, #408, #411, #414, #424)
- Bump CLI from v2.8.1 to v2.11.0 (#405, #413, #418)
- Populate events with dependencies metadata (#396)
- Add auto-instrumentation for compose navigation (#392)
- Ignore minified classes from any instrumentation (#389)
- Fix short class names should not be flagged as minified (#398)
- Bump AGP to v7.3.0 (#378)
- Bump CLI from v2.5.2 to v2.6.0 (#379)
- Bump Android SDK from v6.4.2 to v6.4.3 (#384)
- Update DirectoryProperty to use @InputDirectory (#374)
- Bump AGP to 7.2.1 and Gradle to 7.5.0 (#363)
- Bump Android SDK to v6.3.1 (#365)
- Bump CLI to v2.5.0 (#358)
- Detect minified classes and skip instrumentation to avoid build problems (#362)
- Skip jar processing on AGP < 7.1.2 for signed multi release jars (#334)
- Fix
OkHttp
version3.x
was not instrumented (#351)
- Bump sentry runtime SDK version to
6.1.3
(#333)
- Bump sentry runtime SDK version to
6.1.0
(#321)
- Fix
OkHttp
auto-instrumentation crash, whensentry-android-okhttp
is not present on classpath (#327)
- Auto-install sentry-android SDK and integration dependencies (fragment, timber, okhttp) (#282)
OkHttp
auto-instrumentation (#288)
- Ignore R8 minified libs from instrumentation (#316)
- obfuscated libs instrumentation (adcolony) (#307)
- Ignore R8 minified libs from instrumentation (#316)
- Fix: obfuscated libs instrumentation (adcolony) (#307)
- Fix: obfuscated libs instrumentation (gms) (#303)
- Feature: Auto-install sentry-android SDK and integration dependencies (fragment, timber, okhttp) (#282)
- Feature:
OkHttp
auto-instrumentation (#288)
- Bump: AGP to 7.1.2 (#287)
- Feature: Add support for GuardSquare's Proguard (#263) by @cortinico
- Feature: Add support for GuardSquare's Dexguard (#267) by @cortinico
- Bump: sentry-cli 1.72.0 which prevent daemonize mode from crashing upload process (#262) by @cortinico
- Introduce the
includeProguardMapping
option to exclude the proguard logic, and deprecateautoUpload
in favor ofautoUploadProguardMapping
(#240) by @cortinico - Feature: New File I/O auto-instrumentation (#249)
- Feature: Add compile-time check for sentry-android SDK presence (#243)
- Fix: Correctly add the proguard UUID output directory to the source set (#226)
- Feature: Make the ignoreXXX properties in SentryPluginExtension sets (#225)
- Add support for dry-run on upload native symbols (#209)
- Feature: Add support for M1 Macs (#204)
- Feature: Auto-instrumentation for
androidx.sqlite
andandroidx.room
(#180)
Breaking changes
- The min AGP version required is
7.0.0
See the migration guide on our documentation.
- Fix MetaInfStripTransform breaking Kotlin Gradle and IDE plugin (#291)
- Bump: AGP to 7.1.2 (#287)
- Feature: Add support for GuardSquare's Proguard (#263)
- Feature: Add support for GuardSquare's Dexguard (#267)
- Fix: Do not resolve dependencies at configuration time (#278)
- Fix: Strip out unsupported java classes from META-INF/ (so AGP does not fail before our code is reached) (#264)
- Bump sentry-cli 1.72.0 which prevent daemonize mode from crashing upload process (#262)
- Fix: Incompatibilities with other Gradle plugins using the same API from AGP for bytecode instrumentation (#270)
- Introduce the
includeProguardMapping
option to exclude the proguard logic, and deprecateautoUpload
in favor ofautoUploadProguardMapping
(#240) - Feature: New File I/O auto-instrumentation (#249)
- Feature: Add compile-time check for sentry-android SDK presence (#243)
- Feature: New configuration option
tracingInstrumentation.features
to allow enabling/disabling certain features for auto-instrumentation (#245)
- Fix: Correctly add the proguard UUID output directory to the source set (#226)
- Feature: Make the ignoreXXX properties in SentryPluginExtension sets (#225)
- Expose SentryPluginExtension.tracingInstrumentation (#229)
- Ref: Change Room queries description to Dao class name (#232)
- Fix: Log broken bytecode when build fails (#233)
- Ref: Change db operation names (#237)
- Fix: Associate spans and events when it throws (#219)
- Fix: Do not throw exceptions in case something goes wrong with instrumentation (#217)
- Add support for dry-run on upload native symbols (#209)
- Feat: Add support for M1 Macs (#204)
- Feat: Auto-instrumentation for
androidx.sqlite
andandroidx.room
(#180)
Breaking changes
- The min AGP version required is
7.0.0
- The min Sentry's Android SDK is
4.0.0
See the migration guide on our documentation.
- Bump: AGP to 7.0.2 (#193)
- Bump sentry-cli 1.69.1 which includes a fix for Dart debug symbols (#191)
- Fix: Pass buildDir as task input (#166)
- Fix: Use task logger instead of project logger (#165)
- Bump: AGP to 4.2.2 (#106)
- Fix: missing sentry-cli on embedded resources (#162)
- Enhancement: Avoid Eager Task Configuration (#156)
- Fix: Do not hardcode the build/ folder (#158)
- No documented changes.
- No documented changes.
- Feature: Add support for variant filtering. (#140)
- Fix: Only upload debug symbols for non debuggable App. (#139)
This release comes with a full rewrite of the Sentry Gradle Plugin.
Here is the Migration Guide.
Improvements:
- Using lazily Providers
- Support for Configuration Avoidance
- Only try to upload mapping file if
minifyEnabled
is enabled - Plugin Marker is published, so you may use the
plugins
block - Rewritten in Kotlin
- Unit and Integration tests
- CI Matrix that runs against different AGP/Gradle/Java and OS versions
Breaking changes:
- Sentry Android Gradle Plugin requires Android Gradle Plugin >= 4.0.0
- The
autoProguardConfig
flag has been removed
Changes:
- Bump: sentry-cli to 1.65.0 (#133)
- Bump: Gradle 7.0.2 (#135)
Thank you:
- @cortinico for coding most of it.
- @ansman for driving the first PoC of the full rewrite.
- @cerisier for EA and small fixes.
- Enhancement: Clean up deprecated/removed Dex and Transform tasks (#130)
- Enhancement: Use pluginManager instead of project.afterEvaluate (#119)
- Enhancement: Use assembleTaskProvider lazily (#121)
- Enhancement: Use packageProvider lazily (#125)
- Enhancement: Use mappingFileProvider lazily (#128)
- Feat: Support Configuration Avoidance (#112)
- Fix: Silence the warning for missing mapping file on variants that don't enable minification (#111)
- Bump: sentry-cli to 1.64.1
- Fix: Only wire upload mapping task if minifyEnabled (#86) @cerisier
- Fix: Publish Plugin Marker on maven central @marandaneto
- Feat: Gradle plugin v2 (#50) @cortinico
- Enhancement: Allow module level sentry properties file (#33) @MatthewTPage