Skip to content

Commit 5dce724

Browse files
committed
Fix R8 minification failure with consumer ProGuard rule for DistributionIntegration
Added consumer ProGuard rule in sentry-android-core to handle missing DistributionIntegration class when the distribution module is not included. This follows the same pattern used for other optional integrations like Replay and Timber.
1 parent f5bc2bc commit 5dce724

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

sentry-android-core/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ dependencies {
7676
compileOnly(projects.sentryAndroidFragment)
7777
compileOnly(projects.sentryAndroidTimber)
7878
compileOnly(projects.sentryAndroidReplay)
79-
compileOnly(projects.sentryAndroidDistribution)
8079
compileOnly(projects.sentryCompose)
80+
compileOnly(projects.sentryAndroidDistribution)
8181

8282
// lifecycle processor, session tracking
8383
implementation(libs.androidx.lifecycle.common.java8)

sentry-android-core/proguard-rules.pro

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,8 @@
7878
-dontwarn io.sentry.android.replay.DefaultReplayBreadcrumbConverter
7979
-keepnames class io.sentry.android.replay.ReplayIntegration
8080
##---------------End: proguard configuration for sentry-android-replay ----------
81+
82+
##---------------Begin: proguard configuration for sentry-android-distribution ----------
83+
-dontwarn io.sentry.android.distribution.internal.DistributionIntegration
84+
-keepnames class io.sentry.android.distribution.internal.DistributionIntegration
85+
##---------------End: proguard configuration for sentry-android-distribution ----------

0 commit comments

Comments
 (0)